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)
o2plsRes <- omicsCompAnalysis(Input=list(B1,B2),Names=c("expr","mirna"),
method="O2PLS",Rcommon=2,Rspecific=c(2,2),
center=TRUE,scale=TRUE,weight=TRUE)
# Scatterplot of scores variables associated to common components
# DISCO-SCA
plotRes(object=discoRes,comps=c(1,2),what="scores",type="common",
combined=FALSE,block="",color="classname",shape=NULL,labels=NULL,
background=TRUE,palette=NULL,pointSize=4,labelSize=NULL,
axisSize=NULL,titleSize=NULL)
# JIVE
plotRes(object=jiveRes,comps=c(1,2),what="scores",type="common",
combined=FALSE,block="",color="classname",shape=NULL,labels=NULL,
background=TRUE,palette=NULL,pointSize=4,labelSize=NULL,
axisSize=NULL,titleSize=NULL)
# O2PLS
# Scatterplot of scores variables associated to common components
# Associated to first block
p1 <- plotRes(object=o2plsRes,comps=c(1,2),what="scores",type="common",
combined=FALSE,block="expr",color="classname",shape=NULL,
labels=NULL,background=TRUE,palette=NULL,pointSize=4,
labelSize=NULL,axisSize=NULL,titleSize=NULL)
# Associated to second block
p2 <- plotRes(object=o2plsRes,comps=c(1,2),what="scores",type="common",
combined=FALSE,block="mirna",color="classname",shape=NULL,
labels=NULL,background=TRUE,palette=NULL,pointSize=4,
labelSize=NULL,axisSize=NULL,titleSize=NULL)
# Combined plot of scores variables assocaited to common components
plotRes(object=o2plsRes,comps=c(1,1),what="scores",type="common",
combined=TRUE,block="",color="classname",shape=NULL,
labels=NULL,background=TRUE,palette=NULL,pointSize=4,
labelSize=NULL,axisSize=NULL,titleSize=NULL)
# Loadings plot for individual components
# Separately for each block
p1 <- plotRes(object=discoRes,comps=c(1,2),what="loadings",type="individual",
combined=FALSE,block="expr",color="classname",shape=NULL,
labels=NULL,background=TRUE,palette=NULL,pointSize=4,
labelSize=NULL,axisSize=NULL,titleSize=NULL)
p2 <- plotRes(object=discoRes,comps=c(1,2),what="loadings",type="individual",
combined=FALSE,block="mirna",color="classname",shape=NULL,
labels=NULL,background=TRUE,palette=NULL,pointSize=4,
labelSize=NULL,axisSize=NULL,titleSize=NULL)
# Combined plot
plotRes(object=discoRes,comps=c(1,1),what="loadings",type="individual",
combined=TRUE,block="",color="classname",shape=NULL,
labels=NULL,background=TRUE,palette=NULL,pointSize=4,
labelSize=NULL,axisSize=NULL,titleSize=NULL)
Run the code above in your browser using DataLab