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

Update layout logic taking into account hydrogen bonds #5712

Open
ljubica-milovic opened this issue Oct 10, 2024 · 0 comments
Open

Update layout logic taking into account hydrogen bonds #5712

ljubica-milovic opened this issue Oct 10, 2024 · 0 comments
Labels
feature request Hydrogen bonds Layout Requirements Done Sequence mode Bucket: Sequence mode related issues Snake mode Bucket: Snake mode related issues

Comments

@ljubica-milovic
Copy link
Collaborator

ljubica-milovic commented Oct 10, 2024

Background

  • Out of scope are non-linear structures (hairpins, loops, etc.)
  • This ticket is related to the antisense chain creation ticket: #5678 and the hydrogen bond in macromolecules ticket #5403, and deals with snake and sequence mode layout.

Requirements

  1. If hydrogen bonds connect monomers inside one chain, those hydrogen bonds should be considered as side chain connections for layout purposes.

For the purpose of these requirements a chain is any connection of monomers connected exclusively by R1-R2 backbone connections (ignoring all side connections except sugar-base R3-R1).

  1. If two chains are connected via hydrogen bonds and do not satisfy conditions form requirement 3, then:

2.1. Monomers who participate in those H-bonds should be oriented towards each other (one of the chains should be "flipped");

Bases of the non-"flipped" chain should go bellow the sugars, and the bases of the "flipped" chain should go above the sugars.

2.2. Shorter chain (fewer monomers) should get "flipped", and if they are of the same size, the chain whose center is lower on the canvas;

2.3. All other side chain connections (except R3-R1 sugar-base) should be placed above or bellow the chain backbones;

For non-"flipped" chains the all side-chain-connected monomer(s) should go above the backbone, and for the "flipped" chains all side-chain-connected monomer(s) should go bellow the backbone.

2.4. For R3-R1 sugar-base side connections (when the base does not have hydrogen bonds), that base should be oriented like other bases in the chain (or if there is a tie, bellow the sugar);

2.5. Backbones should be placed parallel to each other,

2.6. The chains should be placed in such a way that the left-most monomer that has a hydrogen bond from the non-"flipped" chain has the monomer that is connected to it via a hydrogen bond from the other chain bellow it.

2.7. Distance between all monomers should be minimum one bond length.

2.8. Multiple backbones/chains can be placed in on a line if they are both connected via H-bonds to the same chain (but not to each other!!!).

2.9. The left-most sugar/amino acid of the chain that changed its orientation should have the terminal indicator changed from 5' to 3' (or opposite) / from N to C (or opposite).

If a chain gets "flipped" after layout its terminal indicators can only be C and 3'.

2.10. The numbering of the "flipped" chain should go in the opposite direction to the non-"flipped" one.

Note: When there are two chains (who do not satisfy requirement 3) who are connected via at least one H-bond but no bases (connected to a sugar via R1-R3) participate in those H-bonds, than no chain can be considered to be "flipped" and requirements 2.1., 2.2., 2.9, and 2.10. do not apply to them.
When there are two chains who have at least one hydrogen bond between a base (connected to a sugar via R1-R3) and some other monomer (who can be a base with the same conditions but can also be anything else) connecting them (and do not satisfy requirement 3) upon layout one of them is to be considered "flipped" and one non-"flipped". The one with bases bellow the sugar is considered as non-"flipped", while the other is "flipped" AND/OR The one with bases above the sugar is considered as "flipped" while the other is non-"flipped".

  1. If there is a circular hydrogen bond connection between three or more chains, those hydrogen bonds should be considered as side chain connection for layout purposes.

For example, we have three chains A, B, and C. A is connected via hydrogen bonds to both B and C, and B is connected via hydrogen bonds to C.

UX

TBD

Examples

Note: These are just examples to get the idea across, there are some non-layout related mistakes - numbers are in the wrong position, there are no terminal indicators, bonds are not drawn as snake bonds etc.

Example 1

Original chain:
image
Create the antisense chain for the selected monomers (automatic layout):
image
Create antisense chain for new selected monomers (automatic layout):
image
Connect two highlighted monomers via backbone connection:
image
Layout:
image

The left-most monomers are aligned (requirement 2.6.)

Example 2

Sense and antisense chains, and two nucleotides:
image
Connect one nucleotide to each chain:
image
Layout:
image

Even though base h56T does not have any hydrogen bonds it is still oriented above the sugar, because all the other side bases are oriented above the sugar (requirement 2.4.)

Example 3

Original canvas:
image
Layout:
image

The chain of U is the longest, so its bases are oriented in the standard way (requirement 2.2.); nucleotide T is placed on the same line as chain U because they are both connected to chain C (requirement 2.8.).

Example 4

Original canvas:
image
Layout:
image

Both chains have the same number of monomers (6), but the nucleotides are lower on the canvas, so the bases will be "flipped" (requirement 2.2.)

image

Example 5

Original chain (and a single phosphate):
image
Create antisense strand by selecting the whole chain (automatic layout):
image
Connect the CHEM from the antisense chain to the phosphate:
image
Layout:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Hydrogen bonds Layout Requirements Done Sequence mode Bucket: Sequence mode related issues Snake mode Bucket: Snake mode related issues
Projects
None yet
Development

No branches or pull requests

1 participant