biplotRes: Biplot of component analysis

Description Usage Arguments Value Author(s) Examples

Description

Generate a biplot of component analysis results

Usage

1
2
3
biplotRes(object, type, comps, block, title=NULL, colorCol=NULL,
                 sizeValues=c(2, 4), shapeValues=c(17, 0), background=TRUE, 
                 pointSize=4, labelSize=NULL, axisSize=NULL, titleSize=NULL)

Arguments

object

caClass object containing component analysis results

type

Character specifying which components to plot; "common", "individual" or "both"

comps

Components to plot. If combined=FALSE, specifies the component indices to use as x and y for the plot. Otherwise, the component from the first block and the component from second block to plot together.

block

Which block to plot, either "1" or "2" or the name of the block.

title

Plot title

colorCol

Character specifying a pData column to use to colorise the plot points

sizeValues

Vector containing sizes for scores and loadings

shapeValues

Vector indicating the shapes for scores and loadings

background

Logical, whether to use a grey background

pointSize

Size of plot points

labelSize

Size of plot labels if not NULL

axisSize

Size of axis text

titleSize

Size of title text

Value

ggplot2 object

Author(s)

Patricia Sebastian-Leon

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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)

# Biplot common part. DISCO-SCA

biplotRes(object=discoRes,type="common",comps=c(1,2),block="",
          title=NULL,colorCol="classname",sizeValues=c(2,4),
          shapeValues=c(17,0),background=TRUE,pointSize=4,
          labelSize=NULL,axisSize=NULL,titleSize=NULL)

# Biplot common part. O2PLS

p1 <- biplotRes(object=o2plsRes,type="common",comps=c(1,2),
                block="expr",title=NULL,colorCol="classname",
                sizeValues=c(2,4),shapeValues=c(17,0),
                background=TRUE,pointSize=4,labelSize=NULL,
                axisSize=NULL,titleSize=NULL)
p2 <- biplotRes(object=o2plsRes,type="common",comps=c(1,2),
                block="mirna",title=NULL,colorCol="classname",
                sizeValues=c(2,4),shapeValues=c(17,0),
                background=TRUE,pointSize=4,labelSize=NULL,
                axisSize=NULL,titleSize=NULL)

# Biplot distinctive part. O2PLS

p1 <- biplotRes(object=discoRes,type="individual",comps=c(1,2),
                block="expr",title=NULL,colorCol="classname",
                sizeValues=c(2,4),shapeValues=c(17,0),
                background=TRUE,pointSize=4,labelSize=NULL,
                axisSize=NULL,titleSize=NULL)
p2 <- biplotRes(object=discoRes,type="individual",comps=c(1,2),
                block="mirna",title=NULL,colorCol="classname",
                sizeValues=c(2,4),shapeValues=c(17,0),
                background=TRUE,pointSize=4,labelSize=NULL,
                axisSize=NULL,titleSize=NULL)

llrs/STATegRa documentation built on May 29, 2019, 3:42 a.m.