cd05-1-GenePCA-class: Class "GenePCA"

Description Usage Arguments Details Value Objects from the Class Slots Methods Author(s) See Also Examples

Description

Perform principal components analysis on the genes (rows) from a microarray or proteomics experiment.

Usage

1
2
3
GenePCA(geneData)
## S4 method for signature 'GenePCA,missing'
plot(x, splitter=0)

Arguments

geneData

A data matrix, with rows interpreted as genes and columns as samples

x

a GenePCA object

splitter

A logical vector classifying the genes.

Details

This is a preliminary attempt at a class for principal components analysis of genes, parallel to the SamplePCA class for samples. The interface will (one hopes) improve markedly in the next version of the library.

Value

The GenePCA function constructs and returns a valid object of the GenePCA class.

Objects from the Class

Objects should be created using the GenePCA generator function.

Slots

scores:

A matrix of size PxN, where P is the number of rows and N the number fo columns in the input, representing the projections of the input rows onto the first N principal components.

variances:

A numeric vector of length N; the amount of the total variance explained by each principal component.

components:

A matrix of size NxN containing each of the first P principal components as columns.

Methods

plot

signature(x = GenePCA, y = missing): Plot the genes in the space of the first two principal components.

Author(s)

Kevin R. Coombes krc@silicovore.com

See Also

SamplePCA, princomp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
showClass("GenePCA")

## simulate samples from three different groups, with generic genes
d1 <- matrix(rnorm(100*10, rnorm(100, 0.5)), nrow=100, ncol=10, byrow=FALSE)
d2 <- matrix(rnorm(100*10, rnorm(100, 0.5)), nrow=100, ncol=10, byrow=FALSE)
d3 <- matrix(rnorm(100*10, rnorm(100, 0.5)), nrow=100, ncol=10, byrow=FALSE)
dd <- cbind(d1, d2, d3)

## perform PCA in gene space
gpc <- GenePCA(dd)

## plot the results
plot(gpc)

## cleanup
rm(d1, d2, d3, dd, gpc)

Example output

Loading required package: cluster
Loading required package: oompaBase
Class "GenePCA" [package "ClassDiscovery"]

Slots:
                                       
Name:      scores  variances components
Class:     matrix    numeric     matrix

ClassDiscovery documentation built on Aug. 4, 2021, 3 p.m.