sigBiplot: Signature Biplot for principal compontents

Description Usage Arguments Value Examples

Description

Produces a bibplot of the selected signature's PCA. Based on ggbiplot and ggplot2.

Usage

1
2
3
sigBiplot(data, signature, groups = NULL, labels = NULL, pcs = c(1, 2),
  main = "", obs.size = 2, var.size = 3, var.scaled = FALSE,
  palette = "Paired", ...)

Arguments

data

gene expression matrix where rownames correspond to unique gene identifiers in signature format, and columns correspond to samples.

signature

character vector containing the signature's gene identifiers.

groups

optional factor variable indicating the groups that the observations belong to. If provided the points will be colored accordingly

labels

optional vector of labels for the observations

pcs

which PCs to plot. default: 1,2

main

plot title

obs.size

size of the points for the observations

var.size

size of the text for the variables

var.scaled

logical value. When set to TRUE the variable text size is proportional to the Euclidean Norm of the variable's PC loading; the variable's contribution to the variance.

palette

colorbrewer palette scheme to be used. Applicable only when groups are provided.

...

methods passed to ggbiplot.

Value

A ggplot2 plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
dummyData <- do.call(rbind, lapply(seq(0.1, 0.9, by = 0.1),
                     rnorm, n = 100, m = 6))
#add a row with bimodal gene expression
dummyData <- rbind(dummyData, c(rnorm(70, 6, 0.1), rnorm(30, 9, 0.1)))

rownames(dummyData) <- paste(rep("gene", nrow(dummyData)),
                             seq(1, nrow(dummyData)), sep = "")

dummySig <- c("gene1", "gene8", "gene9", "gene10")

sigBiplot(dummyData, dummySig)

groups <- factor(c(rep("GroupA", 70), rep("GroupB", 30)))
sigBiplot(dummyData, dummySig, groups, main = "dummySig")

sidiropoulos/PSigA documentation built on May 29, 2019, 9:58 p.m.