error in viewing community network in vmd

Issue #354 resolved
Former user created an issue

Hi sir, I have tried to view the community networks in vm

??pdb <- read.pdb("../chain_A/nw_4TNR_All.pdb")
dcd <- read.dcd("../chain_A/sys5_stride20.dcd")
sele1 <- atom.select(pdb, resno = c(137,142,145,119,117,150,149,218,164,206,233,207,120,311,319,374,375), chain = "D",elety ="CA")
sele2 <- atom.select(pdb, resno = 333, chain = "C", elety = "CA")
sele3 <- atom.select(pdb, resno = 156, chain = "A", elety = "CA")
sele4 <- combine.select(sele1, sele2, sele3, operator = "+")
catD_Allo1D <- trim.pdb(pdb, sele4)
write.pdb(catD_Allo1D, file="catD_Allo1D.pdb")
inds <- atom.select(catD_Allo1D)
trj <- fit.xyz(fixed = pdb$xyz, mobile = dcd, fixed.inds = inds$xyz, mobile.inds = inds$xyz)
cij <- dccm(trj[, inds$xyz]) ## i got the cij matirx successfully 
plot(cij) ##plot us also fine
net <- cna(cij)
plot(net, pdb) ##net plot is also fine
view.cna(net, pdb, launch = TRUE)

i found the following error: Error in if (ncol(start) != 3) stop("Input 'start' and 'end' should be 3 col xyz matrices") : argument is of length zero

when i tried

view.cna(net, catD_Allo1D.pdb, launch = TRUE)

i found this error: Error in inherits(pdb, "pdb") : object 'catD_Allo1D.pdb' not found

  1. i want to plot the path length disrtibution and node degenerecy graphs in other plotting programs like gnuplot or matlab. what are the reqiured data files for these plots and how can i extract and write them to use in different plotting interfaces.

thanking you for your patience, kp

Comments (2)

  1. Xinqiu Yao

    Hi,

    It seems that the layout() function got something wrong. Can you try layout.cna(net, pdb, k=3) and see what the output is?

    For your second error, use catD_Allo1D (i.e. remove ".pdb").

    Path lengths are stored as a component ('$dist') of the returned value of cnapath() (See help(cnapath) for more details). You can use hist() to get the distribution. Node degeneracy can be obtained by the summary() function (Again, see help(summary.cnapath) for details). Both results can be written as plain text to hard drive, which can be easily used for plotting by other software. For example,

    pa <- cnapath(net, from=XX, to=YY)
    
    # write path length distribution to HD
    pld <- hist(pa$dist, plot=FALSE)
    write.table(cbind(pld$mids, pld$counts), file='length_distrib.txt')
    
    # write node degeneracy to HD
    ret <- summary(pa, pdb=pdb)
    write.table(ret$degeneracy, file='node_degeneracy.txt')
    
  2. Log in to comment