plot.bio3d and sse stride for multi-chain PDB not working as expected

Issue #130 resolved
Former user created an issue

Only SSE for Chain A of any PDB that has more than one chain is shown in the B-factor plot made using plot.bio3d.

Output from the following set of commands is shown in the attachment.

pdb<-read.pdb("4AKE") sse<-stride(pdb) ca.inds <- atom.select(pdb, "calpha") plot.bio3d(pdb$atom[ca.inds$atom, "b"], sse=pdb, ylab="B-factor"

Clearly, only SSE for chain A appears in the b-factor plot.

Comments (4)

  1. Barry Grant

    Yes this is a bug, thanks for reporting. We will look into this and update when we have a solution.

  2. Xinqiu Yao

    Hi,

    The problem comes from the residue numbers that are not consecutive for multiple chains. I'm going to update convert.pdb() for SSE annotation and then we can call this function internally in plot.bio3d(). Will come back soon.

  3. Barry Grant

    Resolved with this commit. See commit fofr details and below. Thanks again for catching this!

    ## Taking secondary structure from PDB file and excluding short elements
    pdb<-read.pdb("4AKE") 
    plot.bio3d(pdb$atom[ca.inds$atom, "b"], sse=pdb, ylab="B-factor")
    
    ## Using stride() and including elements of any length as well as using residue numbers from PDB file
    plot.bio3d(pdb$atom[ca.inds$atom, "b"], resno=pdb, sse=stride(pdb), ylab="B-factor", sse.min.length=0)
    
  4. Log in to comment