Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Rainbow coloring in iCn3D isn't behaving correctly #41

Closed
digitalbio opened this issue Sep 2, 2021 · 7 comments
Closed

The Rainbow coloring in iCn3D isn't behaving correctly #41

digitalbio opened this issue Sep 2, 2021 · 7 comments

Comments

@digitalbio
Copy link

digitalbio commented Sep 2, 2021

The Rainbow coloring style should work in the following way - the amino terminus of each protein chain (or the 5' end of each nucleic acid chain) should be red and the carboxyl terminus (or 3' end) should be violet.

When colored correctly, a structure like 1IGY will show the amino ends of all four chains in red.

Each chain needs to be colored independently because each chain is a separate molecule.

Instead it looks like the coloring is treating the four chains as part of a single concatenated molecule.

@digitalbio
Copy link
Author

digitalbio commented Sep 2, 2021

This image shows how the ends of each chain in the structure should be colored and how the amino ends of each residue in the sequence should be colored.

IMG_67A5469A4445-1

@jiywang3
Copy link
Contributor

jiywang3 commented Sep 2, 2021

The rainbow coloring is for any selection. What you can do is to select each chain and apply the rainbow coloring. Here is the share link of my example: https://structure.ncbi.nlm.nih.gov/icn3d/share.html?uqzXVbUSoxbLJocW8
image

@digitalbio
Copy link
Author

No, that doesn't make sense. If I use other coloring styles, I see the coloring applied to the entire protein. For example, I can color a protein by charge without selecting each chain.

In a protein, each chain is independent, so each chain must be colored from the amino end to the carboxyl end.

PDB does this correctly with jsmol. Cn3D does this correctly also.

@jiywang3
Copy link
Contributor

jiywang3 commented Sep 3, 2021

The fundamental design of iCn3D is to apply features only to the selection. Different users have different preferences. This way you can apply Rainbow coloring to any of your selection and make it more flexible.

@digitaltodd
Copy link

digitaltodd commented Sep 3, 2021

The fundamental design is fine and makes sense. The issue is related to global selections.

There are two ways to apply a style to an entire structure: have nothing selected or select all atoms. This works for all of the styles.

In the case of rainbow and spectrum the issue is that the global style is being applied incorrectly, and the resulting display conveys information that is misleading.

Let's use 1NAJ, a DNA structure as an example. When either spectrum or rainbow are applied they are applied to the both stands as if the strands were a single molecule.

As spectrum and rainbow are intended to show the order of residues, the global coloring needs to be set on each chain independently - like chain coloring.

To my knowledge every viewer (including Cn3D) that displays spectrum / rainbow for an entire structure does so on a chain by chain basis so that the relationship of the individual molecules (parallel / anti-parallel) can be observed. LIgands are typically not colored (white)

I've added some examples

Default view - color by chain applied globally
Screen Shot 2021-09-03 at 10 38 22 AM

Rainbow applied global (entire structure) - colors goes from one chain to the next implying a head to toe relationship between the structures
Screen Shot 2021-09-03 at 10 39 11 AM

The rainbow applied correctly - done in iCn3D with five interactions - open the sequence view, select one chain, apply rainbow, select the other chain apply rainbow again to get the correct anti-parallel relationship between the strands. Imagine if you had to apply each chain color independently in any larger structure. Some have 10's and 100's of chains.
Should be done in one click.
Screen Shot 2021-09-03 at 10 40 12 AM

@jiywang3
Copy link
Contributor

jiywang3 commented Sep 3, 2021

I could add two options for Rainbow: per Selection, and per Chain in the next release.

@jiywang3
Copy link
Contributor

jiywang3 commented Sep 4, 2021

The feature is available now.

@jiywang3 jiywang3 closed this as completed Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants