ncbi / icn3d

web-based protein structure viewer and analysis tool interactively or in batch mode
https://www.ncbi.nlm.nih.gov/Structure/icn3d
Other
154 stars 42 forks source link

Mutation annotations #106

Closed msierk closed 1 year ago

msierk commented 1 year ago

It would be nice to have a more descriptive label for the wt and mutant when looking at mutations. e.g. a _WT or _Mut instead of just a 2, which kind of blends in to the PDB or AF ID. I'm also wondering if the scap command could put a label on the mutated residue (e.g. A113S). I could try adding the label myself but I'd apparently need to know the xyz coordinates and I'm not sure how to get those.

add label ASN80 | x 7.082 y 15.36 z 9.254 | size 18 | color #ffff00 | background undefined | type custom

jiywang3 commented 1 year ago

That's a great idea! I will add more text to label the wild type and mutant in the next release. To add a label, you can select one residue with residue ID as "resid" and show the label in the center of your selection using the following code:

let position = ic.applyCenterCls.centerAtoms(me.hashUtilsCls.hash2Atoms(ic.residues[resid], ic.atoms)); let x = position.center.x; let y = position.center.y; let z = position.center.z; let size = 0; let color = 0; let background = 0; ic.analysisCls.addLabel(text, x, y, z, size, color, background, 'custom');

jiywang3 commented 1 year ago

@msierk I released the update. Now you will see the label "Wild Type" and "Mutant": image

youkha commented 1 year ago

great. maybe default the size of sticks 0.3 or 0.2 ... it is a little too fat

also ... mutations may not necessarily be from wild type ... this is the majority but not a necessity here you assume the reference starting sequence is wild type

just a note. It is not a big deal ...

On Sun, Apr 2, 2023 at 9:09 PM Jiyao Wang @.***> wrote:

@msierk https://github.com/msierk I released the update. Now you will see the label "Wild Type" and "Mutant": [image: image] https://user-images.githubusercontent.com/11690222/229390344-939487d7-8190-4cbb-a3d3-1a0fb1441d46.png

— Reply to this email directly, view it on GitHub https://github.com/ncbi/icn3d/issues/106#issuecomment-1493498866, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD35NIMEMY2K3R5NUAJZ3MLW7IPNTANCNFSM6AAAAAAWLDU7LA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- -- Philippe Youkharibache, Ph.D. US +1 415 448 6509 FR +33 666 00 4775

msierk commented 1 year ago

Thanks, @jiywang3!

great. maybe default the size of sticks 0.3 or 0.2 ... it is a little too fat also ...

I agree, I've been setting the stick radius to 0.2 for 3DVizSNP

mutations may not necessarily be from wild type ... this is the majority but not a necessity here you assume the reference starting sequence is wild type just a note. It is not a big deal ...

Yes I've run into this issue with 3DVizSNP. I've been selecting the 'best' PDB structure from the PDBe REST API, but I found out with KRAS that it was picking a structure with an engineered mutant at the site I was looking at, so there was a mismatch between what you see in the scap command and the 3DVizSNP mutant, which is based on the Uniprot sequence. I'm working on implementing a check for this. There is another API call that can tell you if there is an engineered mutant, but it would be nice if PDB had a more straighforward way to label things as wt or not.

msierk commented 1 year ago

@jiywang3 I see the labels in the 2D panel, but my original comment was directed at the label in the upper left of the 3D panel. Would it be possible to change that? Screenshot 2023-04-03 at 5 39 31 PM Screenshot 2023-04-03 at 5 39 41 PM

jiywang3 commented 1 year ago

@msierk I added the text label in 3D display as well.