-
Notifications
You must be signed in to change notification settings - Fork 174
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
Replace selected monomer on canvas with monomer from library in sequence mode #4878
Labels
Milestone
Comments
olganaz
changed the title
Replace selected monomer on canvas with monomer from library (sequence/flex/snake)
Replace selected monomer on canvas with monomer from library in sequence mode
Jun 27, 2024
svvald
added a commit
that referenced
this issue
Jul 31, 2024
9 tasks
rrodionov91
added a commit
that referenced
this issue
Aug 3, 2024
…in sequence mode - added ketcher-standalone builds for indigo without render module - added structService reinitialization
rrodionov91
added a commit
that referenced
this issue
Aug 3, 2024
…in sequence mode - added ketcher-standalone builds for indigo without render module - added structService reinitialization
svvald
added a commit
that referenced
this issue
Aug 5, 2024
rrodionov91
pushed a commit
that referenced
this issue
Aug 5, 2024
rrodionov91
pushed a commit
that referenced
this issue
Aug 5, 2024
rrodionov91
pushed a commit
that referenced
this issue
Aug 5, 2024
svvald
added a commit
that referenced
this issue
Aug 5, 2024
svvald
added a commit
that referenced
this issue
Aug 5, 2024
svvald
added a commit
that referenced
this issue
Aug 5, 2024
svvald
added a commit
that referenced
this issue
Aug 6, 2024
svvald
added a commit
that referenced
this issue
Aug 6, 2024
rrodionov91
added a commit
that referenced
this issue
Aug 6, 2024
- unlocked monomers library for sequence mode - implemented monomer/rna replacing by selecting in sequence mode and clicking by item in library --------- Co-authored-by: Roman Rodionov <roman_rodionov@epam.com>
This was referenced Aug 8, 2024
Verified.
|
This was referenced Aug 14, 2024
Closed
Closed
Open
This was referenced Aug 21, 2024
Side chain connection is not shown for presets w/o bases connected from phosphate to phosphate
#5339
Open
Open
Guch1g0v
pushed a commit
that referenced
this issue
Oct 17, 2024
- unlocked monomers library for sequence mode - implemented monomer/rna replacing by selecting in sequence mode and clicking by item in library --------- 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
Labels
Background
Currently library is blocked in sequence mode and it is impossible to add monomers on canvas from library.
Implementing this feature will unlock the library in sequence mode, adding the option for the user to add/replace monomers on the canvas by choosing them from the library.
When in "text-editing" mode the behavior will be similar to text-editors.
While the selection of monomers in "view only" mode gives the user the ability to replace every selected monomer with monomers from the library.
Solution
In scope of this task monomers are considered to be peptide monomers, sugars, bases, phosphates, chems as well as RNA presets (nucleotides and nucleosides).
AP - attachment points
Nucleotide = sugar+base+phosphate (sugar and base are connected through R3-R1 bond, sugar and phosphate are connected through R2-R1 bond). Base is optional monomer.
Nucleoside = sugar+base connected through R3-R1 bond.
Attachment points of nucleotide: R1 - sugar's R1, R2 - phosphate's R2.
Attachment points of nucleoside: R1, R2 - sugar's R1, R2.
Requirements
.
.
.....2.1 Peptides, nucleotides (RNA presets) and chems should be merged with existed sequence by R2-R1 rule (as for paste) #3916
.....2.2 If monomer being added lacks AP necessary for establishing connections then error message should be displayed and no monomer is added.
.....2.3. If the sequence is empty, and the user clicks on the monomer in the library, no checks are performed, and the monomer is added as the only monomer in the sequence (and canvas remains in edit mode).
.
.
3. If the user selects any number of monomers in text-editing mode, and clicks on the monomer card in the library, one chosen monomer form the library should replace all the selected monomer(s) on the canvas. (user selects 5 monomers -> user selects A in the library -> 5 monomers get replaced by 1 A) Related issues: #5032 and #5031
.....3.1 R2-R1 bonds should be established automatically if possible (rule 2.2 also applies).
..........3.1.1. If the monomer(s) are unable to be replaced the selected monomer(s) stay selected after the user closes the error message.
.....3.2. If any of the selected symbols is @ (and it represents more that one monomer), modal window with a warning message should appear. Warning message: "Symbol @ can represent multiple monomers, all of them are going to be deleted. Do you want to proceed?".
..........3.2.1. "Yes" option -> selected monomer(s) on canvas are replaced.
..........3.2.2. "Cancel" option -> modal window is closed, monomer(s) on canvas remain selected.
..........3.2.3. "Cancel" option should be default.
.....3.3. If any of the selected monomers have side connections, a modal window with a warning message should appear. Warning message: "Side chain connections will be deleted during replacement. Do you want to proceed?"
..........3.3.1."Yes" option -> selected monomer(s) on canvas are replaced, side chain connections are deleted.
..........3.3.2. "Cancel" option -> modal window is closed, monomer(s) on canvas remain selected.
..........3.3.3. "Cancel" option should be default.
.....3.4. If both 3.2. and 3.3. are true, the first warning message should be the one from 3.2.
.
.
4. If the user selects any number of monomers in view mode, and clicks on the monomer card in the library, all selected monomer on the canvas are replaced by chosen monomer from the library each (user selects 5 monomers -> user selects A in the library -> 5 monomers get replaced by 5 As).
.....4.1. R2-R1 bonds should be established automatically if possible.
..........4.1.1. Checks from requirement 2.2. are performed for every selected position.
...............4.1.1.1. If the checks fail at any position an error message should appear. Error message: "The monomer lacks appropriate attachment points, and cannot be inserted at selected positions."
...............4.1.1.2. If the monomer(s) are unable to be replaced the selected monomer(s) stay selected after the user closes the error message.
.....4.2. If any of the selected symbols is @ (and it represents more that one monomer), modal window with a warning message should appear. Warning message: "Symbol @ can represent multiple monomers, all of them are going to be replaced. Do you want to proceed?".
..........4.2.1. "Yes" option -> all selected monomer(s) on canvas are replaced.
(Images for better understanding)
Go to sequence mode, select A and @:
Click on C in the library, "Yes" in the modal window:
..........4.2.2. "Cancel" option -> modal window is closed, monomer(s) on canvas remain selected.
..........4.2.3. "Cancel" option should be default.
.....4.3. If any of the selected monomers have side connections, and the monomer chosen from the library is not of the same type (types: peptides, chems, sugars, bases, phosphates, presets, nucleotides) as at least one selected monomer with a side connection
or
If the monomer chosen form the library is of the same type, but doesn't have all needed attachment points to establish all side connections (see 4.5. and 4.6.),
a modal window with a warning message should appear. Warning message: "Side chain connections will be deleted during replacement. Do you want to proceed?"
..........4.3.1. "Yes" option -> selected monomer(s) on canvas are replaced, appropriate side chain connections are deleted.
..........4.3.2. "Cancel" option -> modal window is closed, monomer(s) on canvas remain selected.
..........4.3.3. "Cancel" option should be default.
.....4.5. If a peptide, chem, sugar, base, phosphate or a nucleotide is being replaced by a monomer of the same type, a side connection at the attachment point Rn (n>2) is preserved is the monomer chosen from the library also has Rn.
(example: user selected, among others, a Cysteine (peptide) with an R3 side connection to Rm of some other monomer-> user chooses dGlutamine (peptide) from the library -> because dGlutamine has R3, Cysteine is replaced with dGlutamine and a side chain connection is established between R3 of dGlutamine and Rm of that other monomer)
.....4.6. If a preset is being replaced with another preset, side connection is preserved if the new preset has the same Rn at the same element within the preset.
(example 1: selected preset has a side connection form R3 of the phosphate -> user chooses a preset that also has R3 in the phosphate -> old preset is replaced by the new, side chain connection from R3 of phosphate is preserved)
(example 2: selected preset has a side connection from R3 of the phosphate -> user chooses a preset from the library that doesn't have R3 in the phosphate, but does have R3 on the base -> replacement leads to breaking of side chain connection (requirement 4.3.)
.....4.7. If both 4.2. and 4.3. are true, the first warning message should be the one from 4.2.
.
.
5. If the canvas is empty, and the "view only" mode is active, clicking on a monomer is the library adds a monomer as the first (and only) monomer in a first sequence and turns on "text edit mode" placing the caret after the new monomer (similar to requirement 2.3.)
.....5.1. No checks need to be preformed.
The text was updated successfully, but these errors were encountered: