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: Remove and insert nucleotides in sequences (sequence representation) #3650

Closed
olganaz opened this issue Dec 4, 2023 · 2 comments · Fixed by #4210
Closed

Macro: Remove and insert nucleotides in sequences (sequence representation) #3650

olganaz opened this issue Dec 4, 2023 · 2 comments · Fixed by #4210

Comments

@olganaz
Copy link
Collaborator

olganaz commented Dec 4, 2023

Background
Monomers in sequence representation are shown as a series of letters, allowing users to interact with the sequence as if it were text.
The bonds R2-R1 are not displayed in sequence representation, instead, the two nucleotides are depicted as symbols that come together to form a word,.
This task covers the ability to modify the sequence by either deleting or inserting nucleotides using a keyboard.
Nucleotide = RNA preset added on canvas (sugar+phosphate+base)
Nucleoside = sugar+base, connected by the bond between R3 AP of sugar and R1 AP of base.

Requirements
In sequence representation user should be able to work with RNA molecule as with text (type, delete):

  1. Text-editing mode
  • Text-editing mode should be turned ON when user starts new sequence OR edits existing sequence.
  • In text-editing mode cursor becomes blinking line and the grid is highlighted (see mockups).
  • New sequence is started by Rclick and choosing the option "Start new sequence" from context menu.
  • Editing of existing sequence becomes after Rclick on sequence and choosing the option "Edit sequence" from context menu.
  • Outclick and 'Esc' stops the text-editing mode.
  1. Nucleotide Entry:
  • Users should be able to input nucleotides onto canvas using a keyboard.
  • By default the type of entered sequence should be specified as RNA
  • For RNA only the {A, T, G, C, U, 'Enter'} are supported.
  • 'Enter' means that new chain is started, which is aligned at the beginning of new row.
  • Each symbol corresponds to the base natural analog . Entering the symbol on canvas means that the appropriate RNA nucleotide is entered. As described in issue #1426
  • When unsupported symbol is entered from keyboard, the system should ignore it and not to perform input.
  1. Nucleotide Addition to the existing sequence:
  • Users should be able to add new nucleotides at either ends or in the middle of a sequence fragment as a text.
  • The layout of the sequence should be automatically adjusted to accommodate added nucleotides.
  • The bonds between existing nucleotides and entered nucleotides should be established according to the rules for RNA monomer connection (phosphate R2 of the first nucleotide should be connected with the sugar R1 of the next nucleotide)
    Image for better understanding:
  • If nucleotide is being added to the end of the sequence, then phosphate 'P' should be added automatically between the last two nucleosides.
    Image for better understanding:
  1. Nucleotide Deletion:
  • User should be able to delete any nucleotide within the RNA fragment using keyboard (Del, Backspace).
  • Following a deletion, the sequence layout should update to reflect these changes.
  • If nucleotide to be deleted is located inside the fragment, connected on both sides to adjacent nucleotides through R2-R1 bonds, then following its removal, these neighboring nucleotides will form an R2-R1 bond between themselves. Any other bonds associated with the monomer being deleted will also be removed along with it.
  • If the last nucleotide in sequence is deleted, then the phosphate connecting the last two nucleosides is also deleted (for sequence mode only).
  • If there are at least two chains on canvas, user places cursor before the first symbol of the second chain in text-editing mode and presses 'Backspace', then two chains are merged (the bond between the last nucleotide in the first chain and the first nucleotide of the second chain is established).

UX

create new sequence

edit existing sequence

@olganaz olganaz assigned Nitvex and olganaz and unassigned Nitvex Dec 4, 2023
@olganaz olganaz added the draft label Dec 4, 2023
@olganaz olganaz changed the title Remove and insert nucleotides in sequences Macro: Remove and insert nucleotides in sequences (sequence representation) Dec 4, 2023
@OlZhur OlZhur added this to the Macromolecules Milestone 4 milestone Dec 5, 2023
@olganaz olganaz removed the draft label Jan 19, 2024
@Zhirnoff
Copy link
Collaborator

Zhirnoff commented Feb 2, 2024

Tests added to the automation table.

rrodionov91 added a commit that referenced this issue Mar 10, 2024
…epresentation) (#4210)

- added performance improvements for monomers rendering and sequence/snake layout

---------

Co-authored-by: Roman Rodionov <roman_rodionov@epam.com>
@Zhirnoff
Copy link
Collaborator

Tested. No comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment