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

Macro: Left-to-right ("Snake-like") layout for RNA #3869

Closed
olganaz opened this issue Jan 12, 2024 · 1 comment · Fixed by #3932
Closed

Macro: Left-to-right ("Snake-like") layout for RNA #3869

olganaz opened this issue Jan 12, 2024 · 1 comment · Fixed by #3932

Comments

@olganaz
Copy link
Collaborator

olganaz commented Jan 12, 2024

Background
This task covers only linear RNA chains.
RNA chain is a set of nucleotides which are connected by bonds.
Nucleotide is made up from sugar, base and phosphate connected with bonds between R2 of sugar and R1 of phosphate, R3 of sugar and R1 of base.
Nucleoside = sugar+base connected through R3-R1 bond (R3 AP of sugar and R1 AP of base).
Two nucleotides are connected though phosphate R2 AP of first nucleotide and sugar R1 AP of second nucleotide. So linear RNA chain represents sugar-phosphate backbone with bases connected to R3 AP of sugars.
First monomer in RNA chain is backbone monomer (sugar OR phosphate) which:
-no R1 attachment point
-free R1 attachment point
-occupied R1 attachment point with the bond R1-Ri, i<>2 (as in #3222)

Requirements

When the "snake" layout button is pressed, nucleotides forming the chain should be arranged on the screen in a snake-like pattern. And while this button is active - the "snake-like" mode is ON.

Arranging of the single RNA chain

  1. While arranging RNA monomers on canvas nucleotide should be considered as single RNA monomer (the bonds inside nucleotide should be defined as in preset and should not be changed by alignment). Nucleosides, phosphates and sugars that are not a part of nucleotide are also considered as separate monomers.
  2. Monomers should be arranged in rows, where they are ordered from left to right.
  3. First monomer in the chain should be located in top left corner of the canvas. If it is impossible to define the first monomer, then such chain should be ignored.
  4. The number of nucleotides in the row should be calculated to fit the canvas width at 100% zoom.
  5. Transition to the next line should not break the nucleotide. (unnecessary condition. see point 1)
  6. The bond between the last monomer in a row and the first monomer in the next row should be shown as a broken line with smoothed corners.

Arranging of multiple RNA chains

  1. If there are multiple chains of monomers on the canvas, each chain is arranged independently of the others.
  2. Chains are arranged from top to bottom, each "snake" starts from the next row.
  3. The position of the first monomer in the chain defines the order of the chains. The chain contains the top left monomer is considered to be the first one.
  4. Similarly, second chain is the one that includes new top left monomer that is not part of the first chain, etc
  5. Single nucleotides and nucleosides are considered as separate chains.

Connection of two RNA monomers in snake-like mode.

  1. R2-R1 and R1-R2 connections are displayed as broken line with smooth corners. While establishing these bonds attachment points should have fixed position (R1 - on the left, R2 - on the right side of backbone monomer)
  2. If two monomers are close to each other horizontally or vertically then the R2-R1 bond should become a straight line.
  3. All bonds, which are connected base to other monomers should remain straight line.
  4. All the bonds connecting R3, R4,... Rn attachment points should remain straight line.
  5. R1-R1 and R2-R2 connections should remain straight line.

Alternatives
All the bonds connecting RNA monomers to the monomers of different type (peptide monomers, CHEMs) should remain straight.

@Zhirnoff
Copy link
Collaborator

Tests added to the automation table.

StarlaStarla added a commit that referenced this issue Jan 23, 2024
StarlaStarla added a commit that referenced this issue Jan 24, 2024
StarlaStarla added a commit that referenced this issue Jan 25, 2024
StarlaStarla added a commit that referenced this issue Jan 29, 2024
StarlaStarla added a commit that referenced this issue Jan 29, 2024
StarlaStarla added a commit that referenced this issue Jan 30, 2024
StarlaStarla added a commit that referenced this issue Jan 31, 2024
StarlaStarla added a commit that referenced this issue Feb 2, 2024
StarlaStarla added a commit that referenced this issue Feb 2, 2024
rrodionov91 added a commit that referenced this issue Feb 2, 2024
Co-authored-by: Roman Rodionov <roman_rodionov@epam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment