Dimension mismatch in rmsip calculation
I am trying to use aanma for multiple proteins fluctuation comparison with rm.gaps=TRUE option. Proteins are of varied length at terminal regions. I am sure rm.gaps will do the job to consider only aligned regions. However, When I tried to calculate rmsip, it shows error saying that 'error in rmsip.default(modes.a = X1$modes, modes.b = X2$modes, : dimension mismatch'. I am struggling to get ride of this but couldn't find any resources. Please help me to resolve it.
Thank you in advance.
Comments (5)
-
-
reporter - attached 1ANG_Repair.pdb
- attached 1ANG_s1_bp_Repair.pdb
- attached 1ANG_1_cl_Repair.pdb
I can give sample data set. I am comparing x-ray crystal structure and their models. I have attached 3 pdb files. Please check and my code is here
library(bio3d) a <- pdbaln(c("1ANG_Repair.pdb","1ANG_1_cl_Repair.pdb","1ANG_s1_bp_Repair.pdb")) b <- read.all(a) modes <- aanma.pdbs(pdbs = b, full=TRUE, outmodes='noh',rm.gaps=TRUE, fit=TRUE) c <- rmsip(modes.a = modes[[1]]$modes,modes.b = modes[[3]]$modes, subset = 10)
-
You have used
outmodes='noh'
, which will overriderm.gaps=TRUE
and just output a 'list' of non-aligned all-atom modes for each individual structure. The reason is that there is no "good" alignment for all heavy atoms. Are you sure the all-atom modes are what you want to compare? We usually just output modes for 'C-alpha' atoms and the comparison would be much easier.You can still do the comparison for all atoms with just a few more coding. For example,
modes1 <- matrix(NA, nrow=ncol(b$all), ncol=ncol(modes[[1]]$U)) modes3 <- matrix(NA, nrow=ncol(b$all), ncol=ncol(modes[[3]]$U)) modes1[!is.gap(b$all[1, ]), ] <- modes[[1]]$U modes3[!is.gap(b$all[3, ]), ] <- modes[[3]]$U gaps.pos <- gap.inspect(b$all) rmsip(modes1[gaps.pos$f.inds, ], modes3[gaps.pos$f.inds, ], subset=10)
Hope it helps.
-
reporter Since the work is about comparing original protein structure with its predicted models, I wanted to compare fluctuations at heavy atom level as well to see minor variations contributed by backbone and side chain atoms. Thank you very much for the clarification. It worked very well as I expected.
-
- changed status to resolved
- Log in to comment
Thanks for reporting!
Can you share a small example that yields the same error please. Perhaps a couple of protein PDB ids from your analysis set and the commands/code you are using? Once we have this we will be able to track down and squash the potential bug here.