seekPCA: PCA

Description Usage Arguments Value Examples

View source: R/Cluster.R

Description

Imports: limma

Usage

1
seekPCA(Counts, Groups, Batches = NA)

Arguments

Counts

matrix oder data.frame with raw counts, Entrez IDs as rownames, and sample names as colnames

Groups

a vector of integers, indicating which column belongs to which group. Must be in the same order as the columns.

Batches

a vector of integers, indicating which column belongs to which batch. Must be in the same order as the columns. Is used to remove batch effects (limma). Note that two batches must have at least one shared group.

Value

A matrix where each row is a sample, and the three columns are principal components

Examples

1
2
3
4
myCounts
myGroup <- c(1,1,2,1,2,2) #(e.g. you have WT,WT,KO,WT,KO,KO)
myBatch <- c(1,1,1,2,2,2)
myPCA <- seekPCA(myCounts, myGroup, myBatch)

Solatar/seeqR documentation built on Feb. 19, 2021, 8:07 p.m.