Learn R Programming

bio3d (version 2.1-2)

plot.dccm: DCCM Plot

Description

Plot a dynamical cross-correlation matrix.

Usage

## S3 method for class 'dccm':
plot(x, sse=NULL, colorkey=TRUE,
                    at=c(-1, -0.75, -0.5,  -0.25, 0.25, 0.5, 0.75, 1),
                    main="Residue Cross Correlation",
                    helix.col = "gray20", sheet.col = "gray80",
                    inner.box=TRUE, outer.box=FALSE,
                    xlab="Residue No.", ylab="Residue No.",
                    margin.segments=NULL, segment.col=vmd.colors(), segment.min=1, ...)

Arguments

x
a numeric matrix of atom-wise cross-correlations as output by the dccm function.
sse
secondary structure object as returned from dssp, stride or read.pdb.
colorkey
logical, if TRUE a key is plotted.
at
numeric vector specifying the levels to be colored.
main
a main title for the plot.
helix.col
The colors for rectangles representing alpha helices.
sheet.col
The colors for rectangles representing beta strands.
inner.box
logical, if TRUE an outer box is drawn.
outer.box
logical, if TRUE an outer box is drawn.
xlab
a label for the x axis.
ylab
a label for the y axis.
margin.segments
a numeric vector of cluster membership as obtained from cutree() or other community detection method. This will be used for bottom and left margin annotation.
segment.col
a vector of colors used for each cluster group in margin.segments.
segment.min
a single element numeric vector that will cause margin.segments with a length below this value to be excluded from the plot.
...
additional graphical parameters for contourplot.

Value

  • Called for its effect.

Details

See the contourplot function from the lattice package for plot customization options, and the functions dssp and stride for further details.

References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.

See Also

plot.bio3d, plot.dmat, filled.contour, contour, image plot.default, dssp, stride

Examples

Run this code
##-- Read example trajectory file
  trtfile <- system.file("examples/hivp.dcd", package="bio3d")
  trj <- read.dcd(trtfile)

  ## Read the starting PDB file to determine atom correspondence
  pdbfile <- system.file("examples/hivp.pdb", package="bio3d")
  pdb <- read.pdb(pdbfile)

  ## select residues 24 to 27 and 85 to 90 in both chains
  inds <- atom.select(pdb,"///24:27,85:90///CA/")

  ## lsq fit of trj on pdb
  xyz <- fit.xyz(pdb$xyz, trj, fixed.inds=inds$xyz, mobile.inds=inds$xyz)

  ## Dynamic cross-correlations of atomic displacements
  cij <- dccm(xyz)

  ## Default plot
  plot.dccm(cij)

  ## Change the color scheme and the range of colored data levels
  plot.dccm(cij, contour=F, col.regions=bwr.colors(200), at=seq(-1,1,by=0.01) )

  ## Add secondary structure annotation to plot margins
  sse <- dssp(read.pdb("1W5Y"), resno=FALSE)
  plot.dccm(cij, sse=sse) 

  ## Add additional margin annotation for chains..
  ch <- ifelse(pdb$atom[pdb$calpha,"chain"]=="A", 1,2)
  plot.dccm(cij, sse=sse, margin.segments=ch)

  ## Plot with cluster annotation from dynamic network analysis
  #net <- cna(cij)
  #plot.dccm2(cij, margin.segments=net$raw.communities$membership)

  ## Focus on major communities (i.e. exclude those below a certain total length)
  #plot.dccm2(cij, margin.segments=net$raw.communities$membership, segment.min=25)

Run the code above in your browser using DataLab