File: LinearEmbeddingMatrix.Rd

package info (click to toggle)
r-bioc-singlecellexperiment 1.28.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 640 kB
  • sloc: makefile: 2
file content (50 lines) | stat: -rw-r--r-- 2,228 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
\name{LinearEmbeddingMatrix}
\alias{LinearEmbeddingMatrix}
\alias{LinearEmbeddingMatrix-class}

\docType{class}

\title{LinearEmbeddingMatrix class}
\description{A description of the LinearEmbeddingMatrix class for storing low-dimensional embeddings from linear dimensionality reduction methods.}

\usage{
LinearEmbeddingMatrix(sampleFactors = matrix(nrow = 0, ncol = 0),
    featureLoadings = matrix(nrow = 0, ncol = 0), factorData = NULL,
    metadata = list())
}

\arguments{
    \item{sampleFactors}{A matrix-like object of sample embeddings, where rows are samples and columns are factors.}
    \item{featureLoadings}{A matrix-like object of feature loadings, where rows are features and columns are factors.}
    \item{factorData}{A DataFrame containing factor-level information, with one row per factor.}
    \item{metadata}{An optional list of arbitrary content describing the overall experiment.}
}

\value{
A LinearEmbeddingMatrix object is returned from the constructor.
}

\details{
The LinearEmbeddingMatrix class is a matrix-like object that supports \code{dim}, \code{dimnames} and \code{as.matrix}.
It is designed for the storage of results from linear dimensionality reduction methods like principal components analysis (PCA),
factor analysis and non-negative matrix factorization.

The \code{sampleFactors} slot is intended to store The low-dimensional representation of the samples, such as the principal coordinates from PCA.
The feature loadings contributing to each factor are stored in \code{featureLoadings}, and should have the same number of columns as \code{sampleFactors}.
The \code{factorData} stores additional factor-level information, such as the percentage of variance explained by each factor,
and should have the same number of rows as \code{sampleFactors}.

The intended use of this class is to allow PCA and other results to be stored in the \code{\link{reducedDims}} slot of a SingleCellExperiment object.
This means that feature loadings remain attached to the embedding, allowing it to be used in downstream analyses.
}

\author{
Aaron Lun, Davide Risso and Keegan Korthauer
}

\examples{
lem <- LinearEmbeddingMatrix(matrix(rnorm(1000), ncol=5),
    matrix(runif(20000), ncol=5))
lem
}