plot_pca_v1: PCA Plot

Description Usage Arguments Value Functions Examples

View source: R/plot_pca.R

Description

A convenience function for plotting PCA scatter plot for samples in ExpressionSet/MSnSet object.

Usage

 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
plot_pca_v1(
  eset,
  phenotype = NULL,
  show.ellispe = TRUE,
  show.NA = TRUE,
  legend.title.width = 20
)

plot_pca_v2(eset, phenotype = NULL, names = FALSE)

plot_pca_v3(
  eset,
  phenotype = NULL,
  label = NULL,
  point_size = 5,
  show.ellispe = TRUE,
  show.NA = TRUE,
  legend.title.width = 20,
  ...
)

plot_pca_v4(
  eset,
  phenotype = NULL,
  label = NULL,
  point_size = 5,
  show.ellispe = TRUE,
  show.NA = TRUE,
  legend.title.width = 20,
  pc.index = c(1, 2),
  ...
)

Arguments

eset

eset (or most likely eset subclass) object

phenotype

character one of the colnames(pData(eset))

show.NA

logical Should the datapoints for which phenotype is unknown be shown? Default is TRUE

legend.title.width

integer Wrapping up too long legend titles. Passed to stringr::str_wrap as width argument. Default is 20.

show.ellipse

logical determining to plot 95% CI based on Hotelling's T-test or not.

Value

plot

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(srm_msnset)
plot_pca_v1(msnset, phenotype = "subject.type", show.ellispe = F)
plot_pca_v1(msnset, phenotype = "subject.type", show.ellispe = T)
plot_pca_v1(msnset)
data(srm_msnset)
plot_pca_v2(msnset, phenotype = "subject.type")
plot_pca_v2(msnset)
data(srm_msnset)
plot_pca_v3(msnset, phenotype = "subject.type")
plot_pca_v3(msnset, phenotype = "subject.type", label = "sample.id")
plot_pca_v3(msnset)
data(srm_msnset)
plot_pca_v4(msnset, phenotype = "subject.type", pc.index=c(1,3))
plot_pca_v4(msnset, phenotype = "subject.type", label = "sample.id", pc.index=c(1,3))
plot_pca_v4(msnset, pc.index=c(1,3))

vladpetyuk/vp.misc documentation built on June 25, 2021, 6:35 a.m.