Simple clustering in PC subspace-How to obtain the typical PDB structure through the clustering diagram of bio3d

Issue #885 new
weina li created an issue

Hello, everyone. The first question for help is how to obtain the typical PDB structure through the clustering diagram of bio3d (bio3d extracts the PDB of a frame through PCA)??? Read the official website description (bio3d: http://thegrantlab.org/bio3d_v2/tutorials/trajectory-analysis ), there is no guidance, while other cluster analysis has log files and index files.

Question
How can we find out which frames correspond to the distinct groups along PC1? HINT: Which variable/object created above tells us about cluster membership?

Comments (2)

  1. Xinqiu Yao

    Hi,

    In the tutorial, the clustering generates a vector that gives you the membership for each frame:

    grps <- cutree(hc, k=2)

    If you print out grps, you will see the cluster ID for each frame. Then, you can do other analyses with this output. For example, if you want to find the representative structure for cluster 1, you may try

    # get all the frames belonging to cluster 1
    frames <- which(grps==1)
    
    # calculate the mean conformation of cluster 1
    mxyz <- colMeans(xyz[frames, ca.inds$xyz])
    
    # which one is the closest to the mean?
    rd <- rmsd(mxyz, xyz[frames, ca.inds$xyz])
    which.min(rd)
    

    Hope it helps.

  2. Log in to comment