Question: Normalize to additional variable (brain weight) in DESeq2
gravatar for mark.ebbert
20 months ago by
mark.ebbert0 wrote:


I'm working on a whole-tissue (brain) RNASeq study in mice where there is substantial neuronal death over time. We have multiple ages. I'd like to normalize to brain weight and would appreciate feedback to make sure I'm not doing anything that would violate DESeq2's internal modeling.

I perform the following steps:

  1. Collect Conditional quantile normalization (CQN) for GC content and transcript length
  2. Extract the offsets
  3. Divide the exp(offsets) by brain weight (in grams)
  4. Divide by the geometric mean


  1. Is there anything about this approach that will disturb DESeq2's internal modeling?
  2. Do you have any other suggestions?

Here is my code:

# Read in the saved length and GC content
mmu.len.gc <- read.delim("mus_musculus_length_and_gc_content.txt", header=TRUE)
mmu.len.gc <- mmu.len.gc[!$length) & !$gc),] <- estimateSizeFactors(

common_transcripts <- intersect(rownames(counts.all), rownames(mmu.len.gc))
counts.common <- counts.all[common_transcripts,]

# Perform conditional quantile normalization for GC and length. This will also
# account for library size.
cqn.obj <- cqn(counts=counts.common,
               sizeFactors = sizeFactors(

# Extract offsets <- cqn.obj$glm.offset

# Normalize to brain weight (converting from milligrams to grams) <- exp( / (sample.sheet$brain.weight/1000)

# Divide by geometric <- / exp(rowMeans(log(

dds <- DESeqDataSetFromMatrix(countData = counts.common, colData = colData, design = ~age + sex + genotype)
normalizationFactors(dds) <- 

Really appreciate your help.


ADD COMMENTlink modified 20 months ago by Michael Love24k • written 20 months ago by mark.ebbert0
Answer: Normalize to additional variable (brain weight) in DESeq2
gravatar for Michael Love
20 months ago by
Michael Love24k
United States
Michael Love24k wrote:

Putting something as an offset (log of normalization factor) is like putting it in as a covariate but enforcing that the coefficient for each gene is equal to 1. I think it's safer here to just put brain weight as a covariate along with age and sex, and then it will be controlled for, for each gene.

ADD COMMENTlink written 20 months ago by Michael Love24k

Thanks Mike. Why not do the same for GC content and transcript length? Scratch that. GC content and transcript lengths are per gene, where brain weight is a single value across all genes. 

ADD REPLYlink modified 20 months ago • written 20 months ago by mark.ebbert0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 275 users visited in the last hour