I have a pdb file of a protein structure, and I would like to programmatically select certain peptides and label them in an annotated pdb file output, so that when the output pdb file is opened again by one of the 3D viewers, one can highlight the annotated peptides.
I can do this interactively using UCSF Chimera or https://www.rcsb.org/3d-view,
and with Chimera, I can even save a session which is a python file that contains the lines of my manual annotations as lists of coordinates.
whereas in RCSB, saving a session produces a molx compressed file that includes hashes such as this one, where myseq
is defined by a range within the file:
{
"parent": "yNaD8QxiUNHaHCvxrC5rew",
"transformer": "ms-plugin.structure-component",
"params": {
"type": {
"name": "bundle",
"params": {
"hash": 1673297064,
"elements": [
{
"groupedUnits": [
[
0
]
],
"set": [],
"ranges": [
1669,
1777
]
}
]
}
},
"nullIfEmpty": true,
"label": "myseq2"
},
So I want to do the same programmatically, e.g.:
annotate_sequences --input file.pdb --sequences 1:ARNDC,2:CDNRA,foo:VYWTSP
I expect an output file where these three peptides are annotated with the labels 1
, 2
, and foo
, so when someone opens the file in a 3D structure viewer, then can select/deselect the annotations.
Any ideas on how to do this?