runPCA: Run PCA scores.

Description Usage Arguments Value Examples

View source: R/pca.R

Description

Compute the projection of either samples or time series features onto a PCA space. In case, of PCA for features, the PCA can be computed for individual sample group as indicated or for samples from all groups. In either, case the data is first collapsed over replicates, so that each gene is represented as a vector of a single time course.

Usage

1
2
3
4
5
6
runPCA(
  object,
  collapse.replicates = FALSE,
  groups.selected = NULL,
  var.stabilize.method = "log1p"
)

Arguments

object

A TimeSeriesExperiment object

collapse.replicates

Whether PCA should be computed on the data with replicates aggregated.

groups.selected

An optional character string indicating a particular group of samples PCA should be applied to. By default set to NULL and all groups are included.

var.stabilize.method

Method for variance stabilization (VST). Currently, supports "none" (no VST), "log1p" (log plus one), "asinh" (inverse hyperbolic sine) or "deseq" (varianceStabilizingTransformation function from DESeq2 package). Default is "log1p".

Value

Returns TimeSeriesExperiment object with PCA results in dim.red slot, a lists containing matrices of coordinates 'pca_sample', and 'pca_features', as well as a vector 'pca_eigs'.

Examples

1
2
3
4

nlhuong/TimeSeriesExperiment documentation built on Sept. 8, 2021, 12:30 a.m.