sigPlot: Signature PCA plot

Description Usage Arguments Value Examples

Description

Plot of the selected signature's PCA using ggplot2.

Usage

1
2
sigPlot(data, signature, groups = NULL, text = FALSE, pcs = c(1, 2),
  main = "", 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.

text

when TRUE it plots textual annotations instead of points based on groups parameter.

pcs

which PCs to plot. default: 1,2

main

plot title

palette

colorbrewer palette scheme to be used.

...

methods passed to ggplot

Value

A ggplot2 plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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")

sigPlot(dummyData, dummySig)

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

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