plotPCA: facopy PCA

Description Usage Arguments Value Author(s) Examples

View source: R/facopy_internal_v45.r

Description

Plot a PCA of the samples based on their similarity given a certain set of alterations.

Usage

1
2
3
plotPCA(fad, alteration, varName, sel = NULL, 
        design = c("binary", "versus", "lvog")[1], 
        do.plot = TRUE, by.size = TRUE, cex = 4)

Arguments

fad

facopyInfo object with a certain study's facopy data.

alteration

A character describing the kinds of alteration to include. It should be one of the following:
- amplifications All amplifications (CN>2).
- deletions All deletions (CN<2).
- loh All loss of heterozygosity (LOH), regardless of copy number.
- cnas All copy number alterations (CN<>2).
- any Any kind of alteration.
- all Any kind of alteration, same as any.
- onlygain Only non-LOH amplifications.
- someloss All deletions plus LOH alterations.

varName

A character indicating the variable of interest within the facopyInfo object. Points representing samples in the PCA will be colored according to the classification in such variable.
Call summary on your facopyInfo object to see the names of defined variables.

sel

A character vector with the chromosome arms that will be taken into account in the analysis. Example: c("1q","9p").

design

Depending on the chosen alteration, different designs are available. The simplest design is binary: an alteration exists or it does not. The versus design, for CNAs, assigns a value of -1, 0 or 1 depending on whether a deletion, no copy number change or an amplification exists for a given feature. The vlog design, for all (any) alterations, assigns a value of -1, 0 or 1 depending on whether a deletion or LOH, no copy number change or an amplification without LOH exists.

do.plot

A logical indicating whether to produce graphical output.

by.size

A logical indicating whether the width of the points' border represents the frequency of the selected alterations.

cex

A numerical value giving the amount by which points in the plot should be scaled relative to the base size. Default is 4.

Value

The results of the PCA are returned and the graphical output is optional.

Author(s)

David Mosen-Ansorena

Examples

1
2
3
4
data(myStudy) # load example study

pca = plotPCA(myStudy, "any", "stage")
head(pca$eig)

facopy documentation built on May 2, 2018, 2:30 a.m.