This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Understanding how champ.DMP determines the reference group for phenotypes

I am using champ.DMP for differential methylation analysis, but I am unclear about how the tool determines the reference group for comparison between phenotypes.

For instance, if I have two categories (e.g., "A" and "B") and the log fold change value for a specific CpG site is positive, how do I consistently know if methylation is higher in group "A" or "B"? Additionally, is there a way to manually set the reference group if I wanted to switch the comparison to analyse 'B' vs. 'A' instead of 'A' vs. 'B'?

I’ve looked through the documentation but couldn’t find any clear explanation of this.

Could someone clarify how to set the baseline group and correctly interpret the log fold change?

Any insights would be much appreciated!

phenotype champ champ.dmp r

1 answer

When you run champ.DMP(), you will see printed the contrast matrix applied in the model Section 2.

Example with the tutorial with test datasets from the package :

[ Section 2:  Find Differential Methylated CpGs Start ]

  -----------------------------
  Start to Compare : C, T
  Contrast Matrix
      Contrasts
Levels pT-pC
    pC    -1
    pT     1
  You have found 3890 significant MVPs with a BH adjusted P-value below 0.05.
  Calculate DMP for C and T done. 

You will see here that C is the reference. If you want to change the reference in your analysis, I strongly recommend to convert your variable to a factor, and then relevel the different levels such as V1 <- factor(V1, levels = c("a", "b", "c")) with your reference as the first level.

Thanks for the clear explanation! Setting the reference group with factor() and relevel() makes sense. Appreciate the help!

Log in to answer this question.