Error in plot.dccm when pdb$helix / pdb$sheet = NULL

Issue #285 resolved
B Albert created an issue

Hello:

I am trying to plot the residue correlation network, but there is some problems:

> modes      <- nma(pdb.open)
 Building Hessian...        Done in 0.234 seconds.
 Diagonalizing Hessian...   Done in 2.695 seconds.
Warning message:
In nma.pdb(pdb.open) :
  Possible multi-chain structure or missing in-structure residue(s) present
  Fluctuations at neighboring positions may be affected.
> cm <- dccm(modes)
  |=========================================================| 100%
> plot(cm, sse=pdb.open, contour=F, col.regions=bwr.colors(20), at=seq(-1,1,0.1) )
Error in unit(start - 0.5, "native") : 
  'x' and 'units' must have length > 0

Comments (8)

  1. Lars Skjærven

    looks like something is wrong with the pdb$helix and pdb$sheet attributes? can you try to plot without providing the sse argument? also, whats the content of pdb$helix and pdb$sheet?

  2. B Albert reporter

    both pdb$helix and pdb$helix are "NULL", I don't know why..... yes, I can plot without option of "sse" argument. But it is a little bit strange to see that I start from two different states of the same protein, the plots looked exactly the same.....

  3. Lars Skjærven

    helix and sheet can be NULL for several reasons, e.g. when reading a PDB file without SHEET and HELIX records. note that you can use function dssp() to assign the SSEs for any PDB object (requires dssp installed on your system).

    The DCCMs obtained by NMA on two different states of the same protein can certainly be similar. to highlight the differences you can consider calculating the difference DCCM (requires that you have the same number of CA atoms):

    # calculate difference
    dcm <- cm1 - cm2
    
    # plot difference DCCM
    plot(dcm)
    

    TODO: add check in plot.dccm() to avoid the error message when sheet/helix=NULL.

  4. Log in to comment