Hi guys,
I'm testing ChAMP package to analyse methylation EPIC-array data. I've a sample table sheet (.csv format) of 96 samples which has the following aspect:
Sample_Name Sample_Well Sample_group
pool_women A01 3
213141 B01 0
pool_men C01 3
253141 D01 0
202196 E01 1
200569 F01 0
242196 G01 1
Sentrix_ID Sentrix_Position
2,04426E+11 R01C01
2,04426E+11 R02C01
2,04426E+11 R03C01
2,04426E+11 R04C01
2,04426E+11 R05C01
2,04426E+11 R06C01
2,04426E+11 R07C01
where Sample_name is the name of my samples, Sample_Well represents the well plate in which the sample has been loaded on the plate, Sample_group represents a categorical variable with three possible values (1 = case, 0 = control, 3 = internal control). Finally, Sentrix_ID and Sentrix_Position report information about the Illumina chip for each sample.
I'm following the tutorial at the following link for realizing ChAMP pipeline: https://www.bioconductor.org/packages/release/bioc/vignettes/ChAMP/inst/doc/ChAMP.html#section-differential-methylation-probes
I'm arrived at the step in which I'd like to determine the Differentially Methylated Probes (DMPs) between samples belong to case and control phenotype using the champ.DMP() function.
Specifically, I ran the following commands:
# setting work directory
setwd("/home/platone1/MethylationData/_EPIPOLE_/20210304_QEIC21-03-2_pt1_1-12/")
# loading ChAMP package
library(ChAMP)
# creating dataDirectory
dataDirectory <- "./IDAT"
# loading raw methylation data from IDAT files
myImport <- champ.import(dataDirectory,arraytype="EPIC")
myLoad <- champ.filter(beta=myImport$beta,
M=NULL,
pd=myImport$pd,
intensity=myImport$intensity,
Meth=myImport$M,
UnMeth=myImport$U,
detP=myImport$detP,
beadcount=myImport$bead,
autoimpute=TRUE,
filterDetP=TRUE,
ProbeCutoff=0,
SampleCutoff=0.1,
detPcut=0.01,
filterBeads=TRUE,
beadCutoff=0.05,
filterNoCG = TRUE,
filterSNPs = TRUE,
population = NULL,
filterMultiHit = TRUE,
filterXY = TRUE,
fixOutlier = TRUE,
arraytype = "EPIC")
# normalizing data
myNorm <- champ.norm(beta=myLoad$beta,
rgSet=myLoad$rgSet,
mset=myLoad$mset,
resultsDir="/home/platone1/ChAMP/plate1//CHAMP_Normalization/",
method="BMIQ",
plotBMIQ=TRUE,
arraytype="EPIC")
# different methylation probes (DMPs)
myDMP <- champ.DMP(beta = myNorm,
pheno = myLoad$pd$Sample_group,
compare.group = c("0", "1"),
adjPVal = 0.05,
adjust.method = "BH",
arraytype = "EPIC")
When I arrived to the DMPs step, I found the following error message:
[===========================]
[<<<<< 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 integer type.
Your pheno information contains following groups. >>
<0>:NA samples.
<NA>:NA samples.
<1>:NA samples.
[The power of statistics analysis on groups contain very few samples may not strong.]
pheno contains 3 phenotypes
Your compare.group parameter is in accord with your pheno. Two pheno types has been added into Compare List.
0_to_1 compare group : 0, 1
[ Section 1: Check Input Pheno Done ]
[ Section 2: Find Differential Methylated CpGs Start ]
-----------------------------
Start to Compare : 0, 1
Contrast Matrix
Contrasts
Levels NA-p
p NA
Error in contrasts.fit(fit, contrast.matrix) :
NAs not allowed in contrasts
Is the problem belonging to the variable chosen for making DMPs analysis?
Thank u!