PCASamples-methods: Principal Components Analysis of Methylation data

Description Usage Arguments Value Note Examples

Description

The function does a PCA analysis using prcomp function using percent methylation matrix as an input.

Usage

1
2
3
4
  PCASamples(.Object, screeplot=FALSE,
    adj.lim=c(0.0004,0.1), scale=TRUE,
    center=TRUE,comp=c(1,2),transpose=TRUE,sd.filter=TRUE,
    sd.threshold=0.5,filterByQuantile=TRUE,obj.return=FALSE)

Arguments

.Object

a methylBase object

screeplot

a logical value indicating whether to plot the variances against the number of the principal component. (default: FALSE)

adj.lim

a vector indicating the propotional adjustment of xlim (adj.lim[1]) and ylim (adj.lim[2]). This is primarily used for adjusting the visibility of sample labels on the on the PCA plot. (default: c(0.0004,0.1))

scale

logical indicating if prcomp should scale the data to have unit variance or not (default: TRUE)

center

logical indicating if prcomp should center the data or not (default: TRUE)

comp

vector of integers with 2 elements specifying which components to be plotted.

transpose

if TRUE (default) percent methylation matrix will be transposed, this is equivalent to doing PCA on variables that are regions/bases. The resulting plot will location of samples in the new coordinate system if FALSE the variables for the matrix will be samples and the resulting plot whill show how each sample (variable) contributes to the principle component.the samples that are highly correlated should have similar contributions to the principal components.

sd.filter

If TRUE, the bases/regions with low variation will be discarded prior to PCA (default:TRUE)

sd.threshold

A numeric value. If filterByQuantile is TRUE, the value should be between 0 and 1 and the features whose standard deviations is less than the quantile denoted by sd.threshold will be removed. If filterByQuantile is FALSE, then features whose standard deviations is less than the value of sd.threshold will be removed.(default:0.5)

filterByQuantile

A logical determining if sd.threshold is to be interpreted as a quantile of all standard deviation values from bases/regions (the default), or as an absolute value

obj.return

if the result of prcomp function should be returned or not. (Default:FALSE)

Value

The form of the value returned by PCASamples is the summary of principal component analysis by prcomp.

Note

cor option is not in use anymore, since prcomp is used for PCA analysis instead of princomp

Examples

1
2
3
4
5
6
7
data(methylKit)

# do PCA with filtering rows with low variation, filter rows with standard
# deviation lower than the 50th percentile of Standard deviation distribution
PCASamples(methylBase.obj,screeplot=FALSE, adj.lim=c(0.0004,0.1),
           scale=TRUE,center=TRUE,comp=c(1,2),transpose=TRUE,sd.filter=TRUE,
           sd.threshold=0.5,filterByQuantile=TRUE,obj.return=FALSE)

fortunatobianconi/methylkit documentation built on May 16, 2019, 1:51 p.m.