Is the 1st plot in plot(pc$U) the same as plot(pc$au[,1])?

Issue #599 resolved
Cheng created an issue

For the PCA analysis, is the 1st plot in plot(pc$U) the same as plot(pc$au[,1])? Thank you!

plot(pc$U) gives me this plot.

plot(pc$au[,1]) gives me this Rplot.png

Comments (5)

  1. Xinqiu Yao

    No, they are not the same. If you check dimensions you can clearly see they are different: dim(pc$au[, 1]), dim(pc$U[, 1]).

  2. Cheng reporter

    Thank you Xin-Qiu. My protein has 442 residues.

    Both dim(pc$au[, 1]) and dim(pc$au[, 1]) give NULL, for length:

    > length(pc$au[, 1])
    [1] 442
    > length(pc$U[, 1])
    [1] 1326
    

    So the pc$U[, 1] shows all the x,y,z coordinates for the 442 alpha-carbons (3*442 = 1326). However, Index Number of 1-442 is used for plot(pc$U). Do you know how to plot each of the plot(pc$U) ? I tried plot(pc$U[,1]), but the Index Number is 1-1326, not normalised to atom index (i.e. 1-442).

    Rplot02.png

  3. Cheng reporter

    Hi Xin-Qiu, could you please help me this?

    Also, can I clarify that dim(pc$U) returns 1326 1326. So the 1326 rows are the contribution of x, y, z of the 442 alpha-carbon, while 1326 columns are the 1326 PCs, is that correct?

  4. Xinqiu Yao

    Yes, all your thoughts about the dimension of pc$U are correct.

    If you want residue wise plot, you should use pc$au instead of pc$U.

  5. Cheng reporter

    I think I understand it, but it is still unclear how to specifically only plot the first image of plot(pc$U), so that I can plot other graphs of PC vs residue-indices (e.g. PC5 vs residue-indices)

  6. Log in to comment