plot.matrix.loadings {bio3d} | R Documentation

## Plot Residue-Residue Matrix Loadings

### Description

Plot residue-residue matrix loadings of a particular PC that is obtained from a principal component analysis (PCA) of cross-correlation or distance matrices.

### Usage

    ## S3 method for class 'matrix.loadings'
    plot(x, pc = 1, resno = NULL, sse = NULL,
      mask.n = 0, plot = TRUE, ...)

### Arguments

`x` | the results of PCA as obtained from `pca.array`.
`pc` | the principal component along which the loadings will be shown.
`resno` | numerical vector or ‘pdb’ object as obtained from `read.pdb` to show residue number on the x- and y-axis.
`sse` | a ‘sse’ object as obtained from `dssp` or `stride`, or a ‘pdb’ object as obtained from `read.pdb` to show secondary structural elements along x- and y-axis.
`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 `plot.dccm`.

### Details

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.

### Value

Plot and also returns a numeric matrix containing the loadings.

### Author(s)

Xin-Qiu Yao

### References

Skjaerven, L. et al. (2014) BMC Bioinformatics 15, 399. Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.

### See Also

`plot.dccm`, `pca.array`

### Examples

    ## 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)

[Package bio3d version 2.3-4 Index]