dupicc | R Documentation |
The function can be used to evaluate duplicate samples by calculating: 1) centered/un-centered Pearson's correlation coefficient between duplicates; 2) abosolute difference between duplicates; 3) ICC for each CpG probes using oneway or twoway model.
dupicc(dat,dupid,mvalue=FALSE,center=TRUE,nCores=2,qcflag=FALSE,qc=NULL,
detPthre=0.05,nbthre=3,skipicc=FALSE,corfig=FALSE,model="oneway")
dat |
Methylation beta value matrix |
dupid |
A data frame with two variables, id1 and id2. The two ids in each row indicate a duplicate pair. These ids should be the same with column names of the input methylation matrix |
mvalue |
If TRUE, the beta value will be converted to M value for calculation of ICC |
center |
If TRUE, the methylation beta values will be centered for each CpG before calculation of ICC or correlation |
nCores |
Number of cores will be used for calculation of ICC |
qcflag |
Whether to perform QC before calculation of ICC |
qc |
QC object from function QCinfo |
detPthre |
If qcflag=TRUE, the methylation values with detection P value higher than the threshold will be removed before calculation |
nbthre |
If qcflag=TRUE, the methylation values with number of bead smaller than the threshold will be removed |
skipicc |
If TRUE, ICC calculation will be skipped |
corfig |
If TRUE, a figure will be generated to demonstrate correlations within duplicates or within non-duplicates |
model |
Using "oneway" or "twoway" model to calculate ICC |
icc: a data frame containing ICC and P values for each probe
dupcor: a data frame containing Pearson's correlation and averaged absolute difference between duplicates.
Zongli Xu
Zongli Xu, Jack A Taylor. Reliability of DNA methylation measures using Illumina methylation BeadChip. Epigenetics 2020
if (require(minfiData)){
path <- file.path(find.package("minfiData"),"extdata")
rgSet <- readidat(path = path,recursive = TRUE)
mdat=getmeth(rgSet)
beta=getB(mdat,"Illumina")
dupidx=data.frame(id1=c("5723646052_R02C02","5723646052_R04C01","5723646052_R05C02"),
id2=c("5723646053_R04C02","5723646053_R05C02","5723646053_R06C02"))
iccresu<-dupicc(dat=beta,dupid=dupidx)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.