YuanTian1991 / ChAMP

21 stars 23 forks source link

Bad error handling when no diff results reported #33

Open ShixiangWang opened 1 year ago

ShixiangWang commented 1 year ago
>   myDMP = champ.DMP(myNorm, pheno = my$pd$Sample_Group, adjPVal = 0.8)  # Error
[===========================]
[<<<<< ChAMP.DMP START >>>>>]
-----------------------------
!!! Important !!! New Modification has been made on champ.DMP(): 

    (1): In this version champ.DMP() if your pheno parameter contains more than two groups of phenotypes, champ.DMP() would do pairewise differential methylated analysis between each pair of them. But you can also specify compare.group to only do comparasion between any two of them.

    (2): champ.DMP() now support numeric as pheno, and will do linear regression on them. So covariates like age could be inputted in this function. You need to make sure your inputted "pheno" parameter is "numeric" type.

--------------------------------

[ Section 1:  Check Input Pheno Start ]

  You pheno is character type.
    Your pheno information contains following groups. >>
    <circular>:33 samples.
    <noncircular>:46 samples.
    [The power of statistics analysis on groups contain very few samples may not strong.]
    pheno contains only 2 phenotypes
    compare.group parameter is NULL, two pheno types will be added into Compare List.
    circular_to_noncircular compare group : circular, noncircular

[ Section 1:  Check Input Pheno Done ]

[ Section 2:  Find Differential Methylated CpGs Start ]

  -----------------------------
  Start to Compare : circular, noncircular
  Contrast Matrix
              Contrasts
Levels         pnoncircular-pcircular
  pcircular                        -1
  pnoncircular                      1
  You have found 1 significant MVPs with a BH adjusted P-value below 0.8.
  Calculate DMP for circular and noncircular done.

[ Section 2:  Find Numeric Vector Related CpGs Done ]

[ Section 3:  Match Annotation Start ]

Error in rowMeans(beta[com.idx, which(pheno == Compare[[i]][1])]) : 
  'x' must be an array of at least two dimensions