RMSF (the axis no. doesn't correspond with the actual no. of residues)
Hi.
I am new to Bio3D and R. I am trying to do RMSF for a trajectory followed by PCA.
My protein is composed of residues 27 to 421. It’s a transmembrane receptor.
Firstly, I selected the Calpha carbons for the transmembrane part so I can fit the trajectory.
ca.inds <- atom.select(pdb, elety = "CA", resno=133:403, verbose = TRUE)
xyz <- fit.xyz(fixed=pdb$xyz, mobile=dcd, fixed.inds=ca.inds$xyz, mobile.inds=ca.inds$xyz)
Secondly, I selected all the receptor’s residue so I can do RMSF for all of it’s CA atoms (including the ones of the N-terminal domain and C-ter)
ca.inds <- atom.select(pdb, elety = "CA", chain="C", verbose = TRUE)
rf <- rmsf(xyz[,ca.inds$xyz])
plot(rf, ylab="RMSF", xlab="Residue Position", typ="l")
However, the labels do not correspond to my receptor residue’s numbers.
I tried to add resno=pdb when I am plotting the graph but I get this:
plot(rf, resno=pdb, ylab="RMSF", xlab="Residue Position", typ="l")
Warning messages:
1: In plot.window(...) : "resno" is not a graphical parameter
2: In plot.xy(xy, type, ...) : "resno" is not a graphical parameter
3: In axis(side = side, at = at, labels = labels, ...) :
"resno" is not a graphical parameter
4: In axis(side = side, at = at, labels = labels, ...) :
"resno" is not a graphical parameter
5: In box(...) : "resno" is not a graphical parameter
6: In title(...) : "resno" is not a graphical parameter
Can anyone help me with this please?
Comments (7)
-
-
reporter It modified the Y axis but this is all. And it gave me some warnings.
plot.bio3d(rf, resno=pdb, ylab="RMSF", xlab="Residue Position", typ="l")
There were 13 warnings (use warnings() to see them)
warnings()
Warning messages:
1: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
2: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
3: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
4: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
5: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
6: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
7: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
8: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
9: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
10: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
11: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
12: In doTryCatch(return(expr), name, parentenv, handler) :
"resno" is not a graphical parameter
13: In plotb3(...) :
Length of input 'resno' does not equal the length of input 'x'; Ignoring 'resno'
-
pdb has to match the length of rf. In the above code, you have selected ‘chain C’. You need to create a new pdb to match it,
spdb ← trim(pdb, chain='C')
.Then,
plot.bio3d(rf, resno=spdb, …)
.
-
reporter Thank you so much. It worked now.
I would also like to specify more x axis values and to show the value of the last tick. I tried writing axis(side=1,at=c(27,37,47,57)) for example but it doesn’t correspond with my actual rmsf. As well the identify(rf) doesn’t find the actual residues positions.
-
resno=pdb
just change the labels. Internally, it is still 1, 2, 3, etc.
A practical way is to create a vector to store PDB residue numbers for easy mapping between the two sets. For example,
resno <- pdb$atom$resno[pdb$calpha] ... axis(side=1,at=match(c(27,37,47,57), resno)) identify(1:length(rf), rf, labels=resno)
Hope it helps.
-
reporter Thank you very much. It helped.
-
reporter - changed status to resolved
- Log in to comment
Try
plot.bio3d(rf, resno=pdb, ...)