Question: ChAMP not handling 3+ levels in contrasts
gravatar for ognjen011
7 weeks ago by
ognjen0110 wrote:

I am trying to perform DMP with a dataset of 92 observations in 3 levels. When I run champ.DMP I get the following output:

[ Section 1:  Check Input Pheno Start ]

  You pheno is factor type.
    Your pheno information contains following groups. >>
    <Buffy>:33 samples.
    <Polymorphonuclear>:29 samples.
    <Lymphocytes>:30 samples.
    [The power of statistics analysis on groups contain very few samples may not strong.]
    pheno contains 3 phenotypes parameter is NULL, EACH PAIR of phenotypes will be added into Compare List.
    Buffy_to_Polymorphonuclear compare group : Buffy, Polymorphonuclear
    Buffy_to_Lymphocytes compare group : Buffy, Lymphocytes
    Polymorphonuclear_to_Lymphocytes compare group : Polymorphonuclear, Lymphocytes

[ Section 1:  Check Input Pheno Done ]

[ Section 2:  Find Differential Methylated CpGs Start ]

  Start to Compare : Buffy, Polymorphonuclear
  Contrast Matrix
Levels               pLymphocytes-pBuffy
  pBuffy                              -1
  pLymphocytes                         1
  pPolymorphonuclear                   0
Coefficients not estimable: pLymphocytes 
Error in, contrast.matrix) : 
  trying to take contrast of non-estimable coefficient
In addition: Warning message:
Partial NA coefficients for 412481 probe(s)

Please note that the contrast matrix is incorrectly created for the group tested. Supplying the parameter makes no difference unless I put in the Lymphocytes-Buffy pair which is always tested.

Reading the code I assume the error is in the function CalculateDMP, specifically this line:

contrast.matrix <- makeContrasts(contrasts = paste(colnames(design)[2:1], 
    collapse = "-"), levels = colnames(design))

colnames(design)[2:1] seems fixed regardless of the pair. Any chance this can be fixed relatively easily?


champ • 51 views
ADD COMMENTlink modified 7 weeks ago by Yuan Tian120 • written 7 weeks ago by ognjen0110
Answer: ChAMP not handling 3+ levels in contrasts
gravatar for Yuan Tian
7 weeks ago by
Yuan Tian120
University College London
Yuan Tian120 wrote:


Have you checked what is the data type of your "pheno" parameter? See if it's factor instead of character. Then if it's factor, try to change it into character then retry the function.

Best Tian

ADD COMMENTlink written 7 weeks ago by Yuan Tian120

Correct, it works! Thanks!

ADD REPLYlink written 6 weeks ago by ognjen0110
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: 295 users visited in the last hour