ChAMP not handling 3+ levels in contrasts
1
0
Entering edit mode
ognjen011 • 0
@ognjen011-22005
Last seen 3.5 years ago

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
    compare.group 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
                    Contrasts
Levels               pLymphocytes-pBuffy
  pBuffy                              -1
  pLymphocytes                         1
  pPolymorphonuclear                   0
Coefficients not estimable: pLymphocytes 
Error in contrasts.fit(fit, 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 compare.group 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?

Cheers!

champ • 1.1k views
ADD COMMENT
1
Entering edit mode
Yuan Tian ▴ 280
@yuan-tian-13904
Last seen 1 day ago
United Kingdom

Hi:

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 COMMENT
0
Entering edit mode

Correct, it works! Thanks!

ADD REPLY

Login before adding your answer.

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