Learn R Programming

STATegRa (version 1.0.0)

plotVAF: Function to plot the VAF (Variance Explained For) obtained from Component Analysis.

Description

This function allows to the user to visualize the VAF results coming from a component analysis. The input is an object resulting from omicsCompAnalysis function of class caClass. The variance explained for (VAF) each component is given in VAF slot, that is a list containing the VAF for common and distinctive components. In the case of O2PLS, VAF cannot be calculated, because components are not orthogonal. Structure of plots associated to DISCO-SCA and JIVE are different. In the case of DISCO-SCA, components of individual blocks have an associated error due to the rotation is not perfect. This is the reason because the DISCO-SCA distinctive components have VAF in the other block. This VAF not associated to the corresponding block could be interpreted as the error for not having a perfect rotation.

Usage

plotVAF(object,mainTitle)

Arguments

object
caClass object containing results of Components Analysis
mainTitle
Title of the plot

Value

Plot representing the VAF of common and distintive components of each block.

See Also

omicsCompAnalysis

Examples

Run this code

# Loading data
data("STATegRa_S3")
B1 <- createOmicsExpressionSet(Data=Block1.PCA,pData=ed.PCA,
                               pDataDescr=c("classname"))
B2 <- createOmicsExpressionSet(Data=Block2.PCA,
                               pData=ed.PCA,pDataDescr=c("classname"))
# Omics components analysis
discoRes <- omicsCompAnalysis(Input=list(B1,B2),Names=c("expr","mirna"),
                              method="DISCOSCA",Rcommon=2,Rspecific=c(2,2),
                              center=TRUE,scale=TRUE,weight=TRUE)
jiveRes <- omicsCompAnalysis(Input=list(B1,B2),Names=c("expr","mirna"),
                              method="JIVE",Rcommon=2,Rspecific=c(2,2),
                              center=TRUE,scale=TRUE,weight=TRUE)
require(ggplot2)

# DISCO-SCA plotVAF
plotVAF(discoRes)

# JIVE plotVAF
plotVAF(jiveRes)

Run the code above in your browser using DataLab