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: RNA Builder allows creating an invalid preset with disconnected sugar #3816

Closed
olganaz opened this issue Dec 27, 2023 · 5 comments · Fixed by #4597 or #4721
Closed

Macro: RNA Builder allows creating an invalid preset with disconnected sugar #3816

olganaz opened this issue Dec 27, 2023 · 5 comments · Fixed by #4597 or #4721
Assignees
Labels
bug Priority: High RNA Builder Bucket: RNA builder related issues

Comments

@olganaz
Copy link
Collaborator

olganaz commented Dec 27, 2023

RNA Builder allows user to select a sugar without R3 connection (e.g. '3SS6') while creating a new preset and save this preset in monomer library. If user further tries to add this preset to canvas, Uncaught ReferenceError: process is not defined error appears in browser console and the operation doesn't succeed.

Instead, RNA Builder should not allow using sugar, base or phosphate as a building block if corresponding monomer doesn't have connection point required for connecting with other monomers in the nucleotide. If user selects a monomer while RNA Builder is in editing mode, the following checks should be applied:

Action Validation rule Error message if violated
Select base Base has R1 connection point Base without R1 connection point cannot make nucleotide
Select base If sugar is selected, it should have R3 connection point Sugar without R3 connection point cannot make this nucleotide
Select sugar If base is selected, sugar should have R3 connection point Sugar without R3 connection point cannot make this nucleotide
Select phosphate Phosphate has R1 connection point Phosphate without R1 connection point cannot make nucleotide
Select phosphate If sugar is selected, it should have R2 connection point Sugar without R2 connection point cannot make this nucleotide
Select sugar If phosphate is selected, sugar should have R2 connection point Sugar without R2 connection point cannot make this nucleotide

A preset can only have the following structures:

  • Sugar+Base
  • Sugar+Phosphate
  • Sugar+Base+Phosphate

If user validation rule is violated corresponding error should be shown in a pop-up error box and 'Save'/'Add to presets' button should be disabled

Ketcher version
[Version 2.17.0-rc.2]
Related issue: #3615

@olganaz olganaz added the bug label Dec 27, 2023
@olganaz olganaz added this to the Macromolecules Milestone 4 milestone Dec 27, 2023
@olganaz olganaz changed the title Macro: Preset which is consisted of monomers without AP necessary to form connections inside preset could be saved in library, but when user ties to add it to canvas, it causes exception in console. Macro: Preset which is consisted of monomers without AP necessary to form connections inside preset could be saved in library, but when user tries to add it to canvas, it causes exception in console. Dec 27, 2023
@vanoprenko vanoprenko changed the title Macro: Preset which is consisted of monomers without AP necessary to form connections inside preset could be saved in library, but when user tries to add it to canvas, it causes exception in console. Macro: RNA Builder allows creating an invalid preset with disconnected sugar Mar 14, 2024
@AlexeyGirin AlexeyGirin added the RNA Builder Bucket: RNA builder related issues label Apr 25, 2024
vitaepam added a commit that referenced this issue May 10, 2024
vitaepam added a commit that referenced this issue May 29, 2024
ilya-asiyuk-epam added a commit that referenced this issue May 31, 2024
…ting-an-invalid-preset-with-disconnected-sugar

#3816 - Added validations and monomer Item disablement
vitaepam added a commit that referenced this issue May 31, 2024
vitaepam added a commit that referenced this issue May 31, 2024
vitaepam added a commit that referenced this issue May 31, 2024
vitaepam added a commit that referenced this issue Jun 2, 2024
vitaepam added a commit that referenced this issue Jun 2, 2024
vitaepam added a commit that referenced this issue Jun 2, 2024
…ting-an-invalid-preset-with-disconnected-sugar-release

#3816 - Update RNA Builder validations
@ilya-asiyuk-epam
Copy link
Contributor

Merged into 2.21 branch - #4721

@rrodionov91 rrodionov91 linked a pull request Jun 3, 2024 that will close this issue
9 tasks
@AlexeyGirin
Copy link
Collaborator

Not fixed.
I still able to create preset with 3SS6 sugar:

  1. Open RNA builder
  2. Click New Preset button
  3. Select Phosphate (P in my case)
  4. Select Base (A in my case)
  5. Select 3SS6 sugar
    image
  6. Press Add to Presets button
    image
  • Indigo Toolkit Version 1.21.0-rc.1.0-g9194599b2-wasm32-wasm-clang-19.0.0
  • Ketcher Version 2.22.0-rc.2 Build at 2024-06-03; 18:43:00
  • Chrome Version 125.0.6422.142 (Official Build) (64-bit)
  • Windows 10

@AlexeyGirin AlexeyGirin reopened this Jun 4, 2024
@NataliaLoginova
Copy link
Collaborator

Alexey and I agreed that the task would be closed. An issue will be created for the case found by Alexey.

@NataliaLoginova
Copy link
Collaborator

Alexey Girin will create issue for the case that he found.

@Zhirnoff
Copy link
Collaborator

Tested. We still can create forbidden RNA preset. We have bug for it in 2.23 #4763
Desktop:

  • OS: Windows 11
  • Browser Chrome
  • Version 124.0.6367.79 (Official Build) (64-bit)

Ketcher version
[Version 2.21.0-rc.3]
Indigo version
[Version 1.20.0-rc.3]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Priority: High RNA Builder Bucket: RNA builder related issues
Projects
Status: Done
10 participants