How to modify the "plot(cij)" for "Residue Cross Correlation"
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:
Width 5000 Height 5920:
Thank you very much!
Comments (8)
-
-
reporter Hi Xin-Qiu, Thank you! I am using
RStudio
, which canSave Plot as Image
then adjust theWidth
andHeight
. I triedSave Plot as PDF
, but it seems could not adjust the resolution. Do you mean usingIllustrator
alone can change the resolution of the picture in the PDF?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 triedplot(cij, resno=c((1,10,50),(2,5,7)))
, but was toldError: unexpected ',' in "plot(cij, resno=c((1,"
-
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...
-
reporter thanks a lot! It does help!
-
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
2) If I tried this
ch <- ifelse(pdb$atom$chain=="H", 1,2)
plot.dccm(cij, margin.segments=ch)
I got the red lines
So how can I get blue and red lines in the same time, representing L and H chains?
Thank you!
-
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)
. -
reporter yes! it works now! Thank you so much!
-
reporter - changed status to resolved
- Log in to comment
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.