Intermediate dot indexing produced a comma-separated list with 34 values, but it must produce a single value when followed by subsequent indexing operations
23 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Masha
el 18 de Mzo. de 2023
Comentada: Masha
el 18 de Mzo. de 2023
% Starting from pdb file
Proteinname='1UXD';
uxd = getpdb(Proteinname);
No_of_residues = uxd.Sequence.NumOfResidues;
uxd.Model.Atom.resName
isTYR = ({uxd.Model.Atom.resName} == "TYR")
uxdTYR = uxd.Model.Atom(isTYR)
In the above code, I am trying to extract the details of only the tyrosine residues from the protein '1UXD'. I am guessing the error is due to the presence of many models of the same protein in the pdb file which might have caused the output to be a comma separated list. I am in need of only the first model's tyrosine (TYR) details.. There is a possibility to handle this by turning the output into a cell array and extracting the first output which corresponds to the first model but I am uncertain of how to approach the code for this. Can anyone help :) Thankyou!
0 comentarios
Respuesta aceptada
Stephen23
el 18 de Mzo. de 2023
Editada: Stephen23
el 18 de Mzo. de 2023
The documentation
states the the MODEL field can be a structure array. Your code does not take that into account.
"I am in need of only the first model's tyrosine (TYR) details"
If you only want the first model, then just use indexing into that array:
uxd.Model(1).Atom.resName
For more information:
Más respuestas (0)
Ver también
Categorías
Más información sobre Biological and Health Sciences en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!