Skip to content

Generate normalization report from normalised betas

epzjlm edited this page Mar 9, 2020 · 1 revision

Generate normalisation report

In the normalization report, principal components analysis will be performed on the most variable probes.

In addition associations will be calculated between the first 10 PCs and the batch variables specified in variables that will be derived from samplesheet. The association tests can be used to identify possible outliers. For example, if Slide is one of your batch variables, it gives a p-value for each Slide rather than an overall p-value. Poor slides can be identified and removed post-normalization.

In the meffil.normalization.parameters variable you can set the number of extracted PCs from the normalized betas and the p-value threshold used for the association testing.

It is important to code your batch variables as a factor in order to look at the associations between PCs and your batch variables eg. Slide, sentrix_row, sentrix_col, Sex and other batch should be coded as a factor. You can check this with:

str(samplesheet)

#You change it by running a loop


batch_var<-c("Slide", "plate","Sex") #PLEASE EDIT THIS LINE
norm.parameters <- meffil.normalization.parameters.from.betas(
	batch.pcs=1:10,
	batch.threshold=0.01
)

Run pcs, normalization summary and make normalisation report.

pcs <- meffil.methylation.pcs(norm.beta,probe.range=20000)
save(pcs,file="pcs.norm.beta.Robj")

normalization.summary<-meffil.normalization.summary.from.betas(pcs, parameters = norm.parameters, samplesheet=samplesheet, variables=batch_var, verbose=TRUE)
meffil.normalization.report.from.betas(normalization.summary, output.file="normalization-report.html")

This creates the file normalization-report.html in the current work directory. The file should open up in your web browser.