[BioC] DEXSeq offset term

Simon Anders anders at embl.de
Tue Oct 9 21:58:03 CEST 2012


Hi Alicia

On 09/10/12 19:16, Alicia Martin wrote:
> Anyway, in both DESeq and DEXSeq you can assign normalization factors using:
>>
>> sizeFactors(yourobject) <- your normalization factors
>>
>> or why dont you use the normalization factors from DESeq/DEXSeq?
>
>
> Thanks a bunch! I should have read the sizeFactors documentation more
> carefully. The reason I really wanted to be able to supply my own
> normalization factors is because we have some large sample-specific GC
> effects on expression that most normalization techniques will be unable to
> take into account. Using conditional quantile normalization (cqn from
> bioconductor) has shown a large improvement in our count distributions.

Well, actually, you can only specify one size factor per sample that 
way. If you use CQN, you probably want to have different size factors 
for every gene. Changing DESeq/DEXSeq to allow for this has been on my 
to-do list since a while, and I still haven't done it, I'm afraid.

On the other hand, as you have already looked into the code anyway and 
found the place where we specify the offsets, you may be able to put 
this together yourself. The function 'testGeneForDEU' calls 
'modelFrameForGene' which returns a model frame, to be used in the GLM 
fit, with a column 'sizeFactors', and the log of this is used as offset. 
If you are comfortable with looking into the innards of DEXSeq, you 
could patch testGeneForDEU: Right after the all to modelFrameForGene, 
modify the modelFrame returned by it by multiplying the sizeFactors 
column with the correction factors supplied by CQN.

But, of course, we should offer a proper interface to get this 
information in. After all, everything else is in place. I hope we get to 
that soon.

   Simon



More information about the Bioconductor mailing list