pcrplot | R Documentation |
First, principal component analysis will be performed in the standadized input data matrix (standadized for each row/CpG), and then the specified number of top principal components (that explain most data variation) will be used to perform linear regression with each specified variables. Regression P values will be plotted for exploration of methylation data variance structure or identification of possible confounding variables for association analysis.
pcrplot(beta, cov,npc=50)
beta |
A methylation beta value matrix with row for probes and column for samples. |
cov |
A data frame of covariates. Categorical variables should be converted to factors. |
npc |
The number of top principal components to plot |
A jpeg figure "svdscreeplot.jpg" to show the variations explained by each principal component.
A jpeg figure "pcr_diag.jpg" to show association strength between principal components and covariates with cell colors indicating different levels of association P values.
Zongli Xu
Zongli Xu, Liang Niu, Leping Li and Jack A. Taylor, ENmix: a novel background correction method for Illumina HumanMethylation450 BeadChip. Nucleic Acids Research 2015
if(FALSE){
if (require(minfiData)) {
mdat <- preprocessRaw(RGsetEx)
beta=getBeta(mdat, "Illumina")
group=pData(mdat)$Sample_Group
slide=factor(pData(mdat)$Slide)
cov=data.frame(group,slide)
pcrplot(beta,cov,npc=6)
}}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.