Learn R Programming

RNAinteract (version 1.20.0)

embedPCA: Computes a PCA for a pairwise interaction matrix.

Description

A principal component analysis is performed for a pairwise interaction matrix. The low-dimensional embedding is returned.

Usage

embedPCA(sgi, screen, channel, dim = 4, embed = "template", withoutgroups = c())

Arguments

sgi
An object of class RNAinteract
screen
The screen name whose interaction matrix will be embedded.
channel
The channel name whose interaction matrix will be embedded.
dim
The embedding dimension.
embed
Either "template" (default) or "query" denotes if the embedding is done for rows or columns.
withoutgroups
Genes annotated with these groupnames are not considered for embedding.

Value

Returns a matrix with dimensions genes x dim.

See Also

RNAinteract-package

Examples

Run this code
data("sgi")
X <- embedPCA(sgi, screen="1", channel="nrCells", dim=2)
plot(X[,1], X[,2], pch=20, cex=0.01)
text(X[,1], X[,2], row.names(X))

Run the code above in your browser using DataLab