Error in the 3D visualization of dccm

Issue #741 new
Elisa Donati created an issue

Dear Bio3D users, I’m trying to perform cross-correlation and network analysis on the trajectory of my system (protein-DNA complex). It works perfectly if I perform the analysis on the ‘CA’ alone for the protein , or on the ‘P' alone for the DNA. However, when I try to combine the two atom selections, I get the following error: “Error in pymol.dccm (….): unequal vector lengths”. I have found other issues with similar problem, but even following the instructions I was not able to solve my issue.

Here, the procedure I’m following:

trajwt2<-read.pdb('traj4R-2.pdb', multi = T)
pdbwt2<-read.pdb('traj4R-2.pdb')
ca.wt <- atom.select(pdbwt2, elety="CA")
p.wt<- atom.select(pdbwt2, elety="P")
inds <- combine.select(ca.wt, p.wt, operator = "OR")
xyztogwt <- fit.xyz(fixed=pdbwt2$xyz, mobile=trajwt2$xyz, fixed.inds=inds$xyz, mobile.inds=inds$xyz)
cijtogwt <- dccm.xyz(xyztogwt[,inds$xyz])
plot.dccm(cijtogwt) # plotting works fine
pdb2 <- trim.pdb(pdbwt2, inds=inds)
pymol.dccm(cijtogwt, pdb= pdb2, type="script", exefile = '/…./PyMOLWin.exe' ) # here the issue.

Error in pymol.dccm(cijtogwt, pdb = pdb2, type = "script", exefile = "/…./PyMOLWin.exe") : unequal vector lengths

dim(cijtogwt)
[1] 378 378
dim(pdb2$atom)
[1] 378 16

net <- cna(cijtogwt, cutoff.cij = 0.6) # it works fine
plot(net, pdb = pdb2)

Error in cmdscale(dist(cent), k = k) : NA values not allowed in 'd'

pdb2

Call: trim.pdb(pdb = pdbwt2, inds = inds)

Total Models#: 1
Total Atoms#: 378, XYZs#: 1134 Chains#: 1 (values: NA)

 Protein Atoms#: 341  (residues/Calpha atoms#: 341)
 Nucleic acid Atoms#: 34  (residues/phosphate atoms#: 34)

 Non-protein/nucleic Atoms#: 3  (residues: 3)
 Non-protein/nucleic resid values: [ DC3 (1), DT3 (2) ]

Protein sequence:
GIQGLAKLIADVAPSAIRENDIKSYFGRKVAIDASMSIYQFLIAVRQGGDVLQNEEGETT
SHLMGMFYRTIRMMENGIKPVYVFDGKPPQLKSGELAKRSERRAEAEKQLQQAQAAGAEQ
EVEKFTKRLVKVTKQHNDECKHLLSLMGIPYLDAPSEAEASCAALVKAGKVYAAATEDMD
CLTFGSPVLMRHLTASEAKKLPIQEFHLSRILQELGLNQEQFVDL...<cut>...VLFQ

Nucleic acid sequence:
CTCTGCCTCAAGACGGAATTGAGGCAGAGCCGTC

  • attr: atom, helix, sheet, seqres, xyz,
    calpha, call

sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] RColorBrewer_1.1-2 ggplot2_3.3.0 corrplot_0.84 igraph_1.2.5 bio3d_2.4-1

loaded via a namespace (and not attached):
[1] Rcpp_1.0.3 lattice_0.20-38 withr_2.1.2 crayon_1.3.4 grid_3.6.3 R6_2.4.1 lifecycle_0.2.0
[8] gtable_0.3.0 magrittr_1.5 scales_1.1.0 pillar_1.4.3 rlang_0.4.5 rstudioapi_0.11 tools_3.6.3
[15] glue_1.3.1 munsell_0.5.0 parallel_3.6.3 compiler_3.6.3 pkgconfig_2.0.3 colorspace_1.4-1 tibble_2.1.3

Thank you very much for the help.
Elisa

Comments (3)

  1. Xinqiu Yao

    Hi,

    Can you try to use ‘xyz’ coordinates instead of a pdb object to draw the correlations? I am not sure the functions support DNA. For example,

    pymol.dccm(cijtogwt, pdb= pdb2$xyz, type="script", exefile = '/…./PyMOLWin.exe' )

  2. Elisa Donati Account Deactivated reporter

    Hi,
    Thank you very much, it works perfectly.

    If I may add a small tip, in case someone needs it:
    after performed the cna function on the system (protein/DNA complex), when I try to plot the 3D visualization of the network analysis, I get the following error:

    plot(net, pdb = pdb2)

    Error in cmdscale(dist(cent), k = k) : NA values not allowed in 'd'

    A collegue of mine has found the following solution:

    plot(net, pdb = file4d2c58eba1) , where file4d2c58eba1.pdb is the pdb file generated by pymol.dccm(cijtogwt, pdb= pdb2$xyz, type="script", exefile = '/…./PyMOLWin.exe' ), together with the R.pml .

    I hope this can help someone with a similar issue.

    Thank you again!
    Elisa

  3. Log in to comment