0 down vote favorite

For my analysis I've performed RT-qPCR and measured fold change of genes as log2. I've been trying to compare gene expression of treated (25 nm PSNP) and control samples across multiple independent genes. Since the genes were independent, I wasn't sure whether it would be accurate to perform an ANOVA, but I performed one anyway so I could still compare treatment and control for each independent gene at the post hoc analysis, and also include bonferroni correction for multiple testing.

So for the post hoc analysis I constructed the following formula:


However, next to the Treated (25 nm PSNP) and Control comparisons, this formula also generates all possible combinations of genes and treatments which I don't want to include in my analysis.

Thus my 2 questions are: 1. Is it right to perform an ANOVA followed by a post hoc analysis to compare treatment and control groups of independent genes (groups)? I figured I could also perform an independent t test for each gene, but I didn't know how to correct for all independent tests afterwards in R. 2. How do I perform a post hoc statistical analysis in R where it only compares Treatment and Control for each indepent gene, instead of going through all possible combinations?

I've included a sneak peak of my datafile so you guys can perhaps get a better grip on my analysis.


Thanks in advance!


I am not sure if what you are doing is wrong, but for sure it's "strange". What is commonly done in this situations (as far as I know) is actually to perform a t-test on each gene, and store the p-value in a vector. Correcting for multiple testing is very easy. Just type ?p.adjust in R and you will have an easy way to correct for multiple testing. You just have to feed the uncorrected p-value to p.adjust and you will get the corrected p-value as output.

  • $\begingroup$ Could you provide a citation to show that it is commonly done? $\endgroup$
    – Mark White
    Jun 23 '17 at 18:06
  • $\begingroup$ I give you some references on tests performed on RT-PCR data. I noticed that people often perform ANOVA as well. Here (sciencedirect.com/science/article/pii/S2214753514000059) is a paper with an overview of analysis methods for RT-PCR. In paragraph 2.4 they talk about comparison of results across conditions. ANOVA seems to be used when several conditions are compared, and t-test when two conditions are compared. Other studies (ncbi.nlm.nih.gov/pmc/articles/PMC1395339) seem to be more oriented towards use of ANOVA. $\endgroup$ Jun 25 '17 at 13:06

I would not suggest independent $t$ tests (at least in the sense of splitting the data into separate parts and running $t$ tests on each part) -- you'd be throwing away all the information that is combined in your model. Here's one approach for doing it with the one model:

model <- aov(Log2~Treatment*Gene)
comps <- pairs(lsmeans(model, ~ Treatment | Gene))
test(comps, by = NULL, adjust = "fdr")

The lsmeans call obtains the predictions for each Treatment, by Gene, and the pairs call compares them. (This does not include comparisons across genes, which was the concern expressed in the question.)

Finally, in the test call, by = NULL removes the grouping so that the results are treated as one family of tests. It uses the p.adjust function to adjust the $P$ values so as to control the false-discovery rate. FDR adjustment is what is typically used in these kinds of studies.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.