dupicc: Evaluation of measurement reliability using duplicate samples

Description Usage Arguments Value Author(s) References Examples

View source: R/dupicc.R

Description

The function can be used to calculate ICC for each CpG probe, and/or centered/un-centered Pearson's correlation coefficient between duplicate samples.

Usage

1
2
dupicc(dat,dupid,mvalue=FALSE,center=FALSE,nCores=2,qcflag=FALSE,qc=NULL,
       detPthre=0.05,nbthre=3,skipicc=FALSE,corfig=FALSE,...)

Arguments

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

...

Any further arguments for function "icc" in R package "irr"

Value

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.

Author(s)

Zongli Xu

References

Zongli Xu, Jack A Taylor. Reliability of DNA methylation measures using Illumina methylation BeadChip. Epigenetics 2020

Examples

1
2
3
4
5
6
7
8
9
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)
}

ENmix documentation built on April 2, 2021, 6 p.m.