runVDJPCA: Run PCA on clonotype abundance matrix

runVDJPCAR Documentation

Run PCA on clonotype abundance matrix

Description

Perform Principal Components Analysis (PCA) on the matrix of sample-level clonotype abundances. In the context of clonotype analysis, this is a form of beta diversity.

Usage

runVDJPCA(x, ...)

## S4 method for signature 'clonoStats'
runVDJPCA(x, unit = c("samples", "clonotypes"))

Arguments

x

A matrix of abundance values where rows are features (clonotypes) and columns are samples.

...

additional arguments.

unit

Character value indicating whether the unit of interest is "samples" or "clonotypes".

Value

A list with class "prcomp". The component x stores the reduced-dimensional representation of the data. For a full description, see prcomp.

Examples

data('contigs')
x <- clonoStats(contigs)
runVDJPCA(x)


kstreet13/VDJdive documentation built on May 31, 2024, 1:26 p.m.