View source: R/plot.matrix.loadings.R
plot.matrix.loadings | R Documentation |
Plot residue-residue matrix loadings of a particular PC that is obtained from a principal component analysis (PCA) of cross-correlation or distance matrices.
## S3 method for class 'matrix.loadings'
plot(x, pc = 1, resno = NULL, sse = NULL,
mask.n = 0, plot = TRUE, ...)
x |
the results of PCA as obtained from |
pc |
the principal component along which the loadings will be shown. |
resno |
numerical vector or ‘pdb’ object as obtained from |
sse |
a ‘sse’ object as obtained from |
mask.n |
the number of elements from the diagonal to be masked from output. |
plot |
logical, if FALSE no plot will be shown. |
... |
additional arguments passed to |
The function plots loadings (the eigenvectors) of PCA performed on a set of matrices
such as distance matrices from an ensemble of crystallographic structures
and residue-residue cross-correlations or covariance matrices derived from
ensemble NMA or MD simulation replicates (See pca.array
for detail).
Loadings are displayed as a matrix with dimension the same as the input matrices
of the PCA. Each element of loadings represents the proportion that the corresponding
residue pair contributes to the variance in a particular PC. The plot can be used
to identify key regions that best explain the variance of underlying matrices.
Plot and also returns a numeric matrix containing the loadings.
Xin-Qiu Yao
Skjaerven, L. et al. (2014) BMC Bioinformatics 15, 399. Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.
plot.dccm
, pca.array
## Not run:
attach(transducin)
gaps.res <- gap.inspect(pdbs$ali)
sse <- pdbs$sse[1, gaps.res$f.inds]
# calculate modes
modes <- nma(pdbs, ncore=NULL)
# calculate cross-correlation matrices from the modes
cijs <- dccm(modes, ncore=NULL)$all.dccm
# do PCA on cross-correlation matrices
pc <- pca.array(cijs)
# plot loadings
l <- plot.matrix.loadings(pc, sse=sse)
l[1:10, 1:10]
# plot loadings with elements 10-residue separated from diagonal masked
plot.matrix.loadings(pc, sse=sse, mask.n=10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.