How to modify the "plot(cij)" for "Residue Cross Correlation"

Issue #584 resolved
Cheng created an issue

This tutorial explains the way to plot the "Residue Cross Correlation" from light blue to pink with black contour lines. Can I ask how to

1) use dark blue to red to plot it (or other colours with more magnitude)? I think dark blue and red could differentiate more.

2) Can I remove the black contour lines? Because too many black lines will cover the other colours

3) How to change the axis label, title, e.g. change Residue No. to Residue Number How to change the axis label interval, e.g. change it from 1, 100, 200 to 1, 50, 100, 150, 200?

4) If I increase the resolution (10*10 folds), the font size for the axis labels, titles become very small, and the legend bar becomes very narrow. How to make them the same as before?

Width 500 Height 592: Rplot02.png

Width 5000 Height 5920: 201848-120210.jpg

Thank you very much!

Comments (8)

  1. Xinqiu Yao

    Hi,

    Have you checked the relevant help documentation (http://thegrantlab.org/bio3d/html/plot.dccm.html)? In the example section, it gives instructions on how to modify the plot.

    About the resolution, how did you exactly change it? I normally generate a regular PDF file and enlarge/reduce it in Illustrator (or other your favorite software that can handle PDF files) if necessary, which will keep relative scales of elements.

    Let me know if you have further questions.

  2. Cheng reporter

    Hi Xin-Qiu, Thank you! I am using RStudio, which can Save Plot as Image then adjust the Width and Height. I tried Save Plot as PDF, but it seems could not adjust the resolution. Do you mean using Illustrator alone can change the resolution of the picture in the PDF? Picture1.png

    Thank you for the link, it is very helpful! Can I ask how to use resno properly? If I want only label 1,10,50 on the x-axis and 2,5,7 on the y-axis, I tried plot(cij, resno=c((1,10,50),(2,5,7))), but was told Error: unexpected ',' in "plot(cij, resno=c((1,"

  3. Xinqiu Yao

    PDF graphics are vectors and so no concept of resolution (or you can say infinity resolution). Open a PDF file with Illustrator, adjust its size to fit your purpose, and export it as e.g. tiff and set a resolution (normally 300dpi).

    No, 'resno' is not for changing axis ticks. I think you cannot change ticks with arguments - it is automatically calculated and fixed in the code. But it should be easy to change - open plot.dccm.R, search 'xy.at', and set it to whatever sequence you want. After saving the modified file, load it in R with source('plot.dccm.R'). Then you can use the modified function by simply calling its name.

    Hope it helps...

  4. Cheng reporter

    Can I also ask the annotation for chains? My pdb has light (L) and heavy (H) chain as shown in the chain ID in the PDB column.

    1) If I tried this

    ch <- ifelse(pdb$atom$chain=="L", 1,2)

    plot.dccm(cij, margin.segments=ch)

    I got the blue lines 201849-114529.jpg

    2) If I tried this

    ch <- ifelse(pdb$atom$chain=="H", 1,2)

    plot.dccm(cij, margin.segments=ch)

    I got the red lines 201849-114640.jpg

    So how can I get blue and red lines in the same time, representing L and H chains?

    Thank you!

  5. Xinqiu Yao

    Is your pdb contains all atoms? If so, you should build the vector on residues using ch <- ifelse(pdb$atom$chain[pdb$calpha] == "L", 1, 2).

  6. Log in to comment