Understand fold changes
1
0
Entering edit mode
David ▴ 860
@david-3335
Last seen 6.0 years ago

Hello,

I have an experiments where i have 6 groups. I have followed the documentation in order to compare pairwise groups.

I have normalized the data as follows

...

p = cumNormStat(css)
css = cumNorm(css, p = p)
pd <- pData(css)
mod = model.matrix(~treatment,data=pd)
colnames(mod) = levels(pd$treatment)

# Apply fitZig function
settings = zigControl(maxit = 10, verbose = TRUE)
res = fitZig(obj = css, mod = mod, control = settings)
zigFit = res$fit
finalMod = res$fit$design

> head(finalMod)
          GROUP_A0 GROUP_A14 GROUP_A28 GROUP_B0 GROUP_B14 GROUP_B28 scalingFactor
Sample1         1          0          0          0           0           0     0.4038131
Sample2         1          0          0          1           0           0     0.4222330
Sample3         1          0          0          0           0           0     0.4499575
Sample4         1          0          0          1           0           0     0.4179200
Sample5         1          0          0          1           0           0     0.7259592
Sample6         1          0          0          0           0           0     0.6535187

 

# Then i create a pairwise foldchanges comparison as follows

contrast.matrix = makeContrasts(GROUP_A14 - GROUP_A0, levels = finalMod)
> contrast.matrix
               Contrasts
Levels          GROUP_A14 - GROUP_A0
  GROUP_A0                         -1
  GROUP_A14                         1
  GROUP_A28                         0
  GROUP_B0                         0
  GROUP_B14                        0
  GROUP_B28                        0
  scalingFactor                      0

fit2 = contrasts.fit(zigFit, contrast.matrix)
fit2 = eBayes(fit2)
top <- topTable(fit2,number=Inf)

Let´s look at a particular OTU (OTIU_320) for from the top table:

 OTUname     logFC    AveExpr         t      P.Value    adj.P.Val        B  Kingdom
70 OTU_320  -7.448524 9.953013 -8.102799 2.586277e-12 3.004845e-11 15.91786 Bacteria
       Phylum   Class           Order           Family         Genus
70 Firmicutes Bacilli Lactobacillales Streptococcaceae Streptococcus

 

It seems that OTU_320 is downregulated in GROUP_A14 compared to GROUP_A0, at least  -7.44 times (log2). 

 

Now I have extracted all values using the MRcounts (css, log=F) and selected athe same specific OTU and computed the mean for each group

OTU_320:

the mean value for  GROUP_A0 is 2900.35263 (log2 = 11.5) for this particular OTU

the mean value for  GROUP_A14 is 5067.54602 (log2=12.3) for this particular OTU

Just by looking at the logration there is a difference of 12.3-11.8 = 0.8 

So (please correct me if i´m wrong i expect an upregulation of this particular OTU in GROUP_A14 of 0.8 log2).

 

i don´t understand why there is a so big difference (downregulation of 7.44 when using the recommended procedure vs up regulation of 0.8 when comparing means of normalized counts) and would like to understand if this is the result of the fitZig algorithm ? Can you help me on this ? I need to understand this to be able to explain to the biologists that play on their side with the normalized counts.

 

By the way if i compare average expression there are also different (9.95 in toptable) vs 12 by comparing normalized data means for this two groups. 

Thanks,

metagenomeseq • 1.0k views
ADD COMMENT
0
Entering edit mode
@joseph-nathaniel-paulson-6442
Last seen 7.1 years ago
United States

Happy to take a look at the data if you'd like to send it to my email.

ADD COMMENT

Login before adding your answer.

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