Code Monkey home page Code Monkey logo

Comments (6)

jiywang3 avatar jiywang3 commented on June 20, 2024

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');

from icn3d.

jiywang3 avatar jiywang3 commented on June 20, 2024

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

from icn3d.

youkha avatar youkha commented on June 20, 2024

from icn3d.

msierk avatar msierk commented on June 20, 2024

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.

from icn3d.

msierk avatar msierk commented on June 20, 2024

@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

from icn3d.

jiywang3 avatar jiywang3 commented on June 20, 2024

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

from icn3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.