how to plot and extract data from cij and net calculations in a multiple chain protein system

Issue #344 resolved
Kajwal Kumar Patra created an issue

Dear sir, I am working with a 4-chain protein system with resno starting form 113 to 599 in each chain. so for a particular residue i need to know both resno and as well as the chainID according to my pdb file. only 'resno' information can lead to any chains(A,B,C,D). here i am facing some problems, For example: i am calculating the network analysis,

net <- cna(cij)
print(net)

the net object has 17 community nodes and 59 edges. now there is a chance of a community containing members of different chains. in that case , if i type "summary(net)$members1" it shows the members of node-1 in atomID format, if type

resno <- pdb$atom[pdb$calpha, 'resno']
cm1 <- summary(net)$members[[1]] # node ids for community #1
cm1res <- resno[cm1]

it gives the resno of members of node-1. and still it lacks the informations about the chainID of the member. so i want both the chainID and resno of all members of all nodes so that we can distinguish them clearly. infact it will be better if i can get all the data in terms of chainID and resno.

2)for the same pdb, i have ploted a residue cross correlation matrix, the commands are,

inds <- atom.select(pdb, elety="CA")
trj <- fit.xyz(pdb$xyz, mobile=dcd, fixed.inds = inds$xyz, mobile.inds= inds$xyz)
cij <- dccm(trj[, inds$xyz])
source('plot.dccm.R')
source('add.sse.R')
plot.dccm(cij,  resno=pdb, contour=FALSE)

(i)the plot does not specify the chainID in the axis label, so it is confusing to identify the chains, (ii)if i want to highlight some specific resno(like 145, 333, 119) of every chins in the plot, how can i do that?

  • i am attaching the plot, pdb file and cij file for better understand of the situation

Comments (6)

  1. Xinqiu Yao

    Hi,

    1) You can get chain ID by e.g.

    #!
    chain <- pdb$atom[pdb$calpha, 'chain']
    cm1chn <- chain[cm1]
    

    2) Try plot.dccm(cij, resno=paste(resno, chain, sep='_'), contour=FALSE) and then you will have chain IDs added following each resno.

    Adding customized annotations in DCCM plot would be tricky but is still doable. For example, to add lines for highlighting resno 145, 333, 119,

    key.resno <- c(145, 333, 119)
    key.ind <- which(resno %in% key.resno)
    grid.lines(x=unit(key.ind, 'native'), gp=gpar(col='gray80', lty=3), vp=vpPath('plot_01.toplevel.vp', 'plot_01.panel.1.1.vp'))
    grid.lines(y=unit(key.ind, 'native'), gp=gpar(col='gray80', lty=3), vp=vpPath('plot_01.toplevel.vp', 'plot_01.panel.1.1.vp'))
    

    Use them after calling plot.dccm().

  2. Log in to comment