- edited description
cnapath error : $ operator is invalid for atomic vectors
Hello,
I have encountered error in suboptimal path calculation -
pa_all_chA <- cnapath(net.cut.all_chA, from=142, to=197, k=20)
# and this is the error message
0%Error in x$dist : $ operator is invalid for atomic vectors
In addition: Warning message:
In mclapply(1:(length(last.path$path) - 1), function(i) { :
all scheduled cores encountered errors in user code
but while running this command -
> pa_all_chA <- cnapath(net.cut.all_chA[[1]], from=20, to=40, k=20)
I get this as error msg -
Error in cnapath(net.cut.all_chA[[1]], from = 20, to = 40, k = 20) :
Input cna is not a 'cna' object
and the output for net.cut.all_chA[[1]]
is -
> net.cut.all_chA[[1]]
IGRAPH UNW- 200 656 --
+ attr: name (v/c), color (v/c), size (v/n), weight (e/n)
+ edges (vertex names):
[1] 1 --2 1 --3 2 --3 2 --80 2 --83 2 --84 3 --4 3 --5 3 --80
[10] 3 --84 3 --85 3 --86 3 --124 4 --5 4 --76 4 --80 4 --86 4 --121
[19] 4 --122 4 --124 5 --6 5 --86 5 --87 5 --88 5 --125 6 --7 6 --8
[28] 6 --88 6 --91 6 --125 6 --126 6 --127 7 --8 7 --15 7 --18 7 --19
[37] 7 --88 7 --89 7 --90 7 --127 8 --9 8 --90 8 --91 8 --93 8 --126
[46] 8 --127 8 --128 8 --129 9 --10 9 --13 9 --15 9 --128 9 --129 10--11
[55] 10--12 10--13 10--15 10--154 10--157 11--12 11--13 11--145 12--13
[64] 12--14 13--14 13--15 13--129 13--131 13--177 14--15 14--16 14--17
+ ... omitted several edges
I have followed discussions on this issue but not able to solve it. I am using new versions of bio3d and igraph - bio3d_2.2-2 & igraph_1.0.1.
Please help me in solving this issue. Thank you.
Regards santosh
Comments (10)
-
reporter -
- edited description
-
Hi Santosh,
The first error was reported before and it has been fixed by a recent commit. Note that the latest development/bugfixes have not been pushed to CRAN (and so you cannot install it simply by e.g.
install.packages('bio3d')
). To download and install the latest version containing the fix, please trylibrary(devtools) install_bitbucket("Grantlab/bio3d", ref='master', subdir="ver_devel/bio3d/")
For the second error, it seems the 'cna' object is not properly generated. Could you tell me how you got the 'net.cut.all_chA1'?
-
reporter Hi, Thank you very much.I have reinstalled as the way u told and the first error is fixed now.
I have followed following commands for generating 'cna' for my trajectory -
pdb2.1 <- read.pdb("ATP_TMP_2_1.pdb") dcd2.1 <- read.dcd("ATP_TMP_2_1.dcd") inds_2_chA <- atom.select(pdb2.1, "noh") trj_2_chA <- fit.xyz(fixed = pdb2.1$xyz, mobile = dcd2.1, fixed.inds = inds_2_chA$xyz, mobile.inds = inds_2_chA$xyz) cij_2_chA <- dccm(trj_2_chA[, inds_2_chA$xyz], grpby=pdb2.1$atom[inds_2_chA$atom, "resno"]) cm_2_chA <- cmap(trj_2_chA[, inds_2_chA$xyz], grpby=pdb2.1$atom[inds_2_chA$atom, "resno"], dcut=4.5, scut=0, pcut=0.75, mask.lower=FALSE, ncore=8) net.cut.all_chA <- cna(cij_2_chA, cutoff.cij=0.50, cm_2_chA = cm_2_chA, ncore = 8)
Please correct me if i am wrong. As in your example in cnapath(), you have compared the states by taking two PDB ids and calculated normal modes followed by network analysis. In which summary(net) will give to separate networks for each states(1, 2). Such kind of state specific networks will not be generated and needed in my case. In my case
net.cut.all_chA[[1]]
is eqivalent to net.cut.all_chA$network. Sorry i might have asked a wrong question. Thank you for support and help.
regards santosh
-
Hi,
It is a little bit hard to read the commands you posted but with a quick glance I didn't find any apparent problem. Could you reinsert your commands by first clicking the 'code' button listed above the editor box?
-
reporter Hi,
I have modified the above text. Please have a look at it.
Thank you very much.I have reinstalled as the way u told and the first error is fixed now.
I have followed following commands for generating 'cna' for my trajectory -
pdb2.1 <- read.pdb("ATP_TMP_2_1.pdb") dcd2.1 <- read.dcd("ATP_TMP_2_1.dcd") inds_2_chA <- atom.select(pdb2.1, "noh") trj_2_chA <- fit.xyz(fixed = pdb2.1$xyz, mobile = dcd2.1, fixed.inds = inds_2_chA$xyz, mobile.inds = inds_2_chA$xyz) cij_2_chA <- dccm(trj_2_chA[, inds_2_chA$xyz], grpby=pdb2.1$atom[inds_2_chA$atom, "resno"]) cm_2_chA <- cmap(trj_2_chA[, inds_2_chA$xyz], grpby=pdb2.1$atom[inds_2_chA$atom, "resno"], dcut=4.5, scut=0, pcut=0.75, mask.lower=FALSE, ncore=8) net.cut.all_chA <- cna(cij_2_chA, cutoff.cij=0.50, cm_2_chA = cm_2_chA, ncore = 8)
Please correct me if i am wrong. As in your example in cnapath(), you have compared the states by taking two PDB ids and calculated normal modes followed by network analysis. In which summary(net) will give to separate networks for each states(1, 2). Such kind of state specific networks will not be generated and needed in my case. In my case
net.cut.all_chA[[1]]
is eqivalent to net.cut.all_chA$network. Sorry i might have asked a wrong question. Thank you for support and help.
regards santosh
-
Thanks. I've checked your commands of building the network and they all looks fine! However, it is improper to use something like
cnapath(net.cut.all_chA[[1]])
; use insteadcnapath(net.cut.all_chA)
. Hope it helps. -
reporter Hi,
Thanks for the support, it helped a lot.
regards santosh
-
- changed status to resolved
The problem is resolved with the recent commit in Master
-
- changed version to v2.2
- Log in to comment