more information related to issue #158 view.cnapath usage

Issue #159 resolved
Former user created an issue

Thank you for your response. Error related to view.cnapath function comes from trying to reproduce this set of commands provided with man page of the function.

All commands right before view.cnapath(pa1, pdb, launch = TRUE) run OK.

view.cnapath(pa2, pdb2, launch = TRUE)
Error in x$dist : $ operator is invalid for atomic vectors

attach(transducin)
inds = match(c("1TND_A", "1KJY_A"), pdbs$id)

npdbs <- pdbs.filter(pdbs, row.inds=inds)
gaps.res <- gap.inspect(npdbs$ali)

modes <- nma(npdbs)
cij <- dccm(modes)
net <- cna(cij, cutoff.cij=0.3)

# get paths
pa1 <- cnapath(net[[1]], from = 314, to=172, k=50)
pa2 <- cnapath(net[[2]], from = 314, to=172, k=50)

# print the information of a path
pa1

# print two paths simultaneously
pas <- list(pa1, pa2)
names(pas) <- c("GTP", "GDI")
print.cnapath(pas)

# Or, for the same effect,
# summary(pa1, pa2, label=c("GTP", "GDI"))

# replace node numbers with residue name and residue number in the PDB file
pdb <- read.pdb("1tnd")
pdb <- trim.pdb(pdb, atom.select(pdb, chain="A", resno=npdbs$resno[1, gaps.res$f.inds]))
print.cnapath(pas, pdb=pdb)

# plot path length distribution and node degeneracy
print.cnapath(pas, pdb = pdb, col=c("red", "blue"), plot=TRUE)

# View paths in 3D molecular graphic with VMD
#view.cnapath(pa1, pdb, launch = TRUE)
#pdb2 <- read.pdb("1kjy")
#pdb2 <- trim.pdb(pdb2, atom.select(pdb2, chain="A", resno=npdbs$resno[2, gaps.res$f.inds]))
#view.cnapath(pa2, pdb2, launch = TRUE)

detach(transducin)

Comments (3)

  1. Xinqiu Yao

    Hi,

    Thanks for spotting this. It is a bug that came in after we did some changes on the function recently. It has been fixed now: Update your bio3d with the latest master branch.

    Let me know if it solves your problem. Thanks!

  2. Log in to comment