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

Support variant monomers in Ketcher (flex mode) #4554

Closed
olganaz opened this issue Apr 30, 2024 · 2 comments · Fixed by #5314
Closed

Support variant monomers in Ketcher (flex mode) #4554

olganaz opened this issue Apr 30, 2024 · 2 comments · Fixed by #5314

Comments

@olganaz
Copy link
Collaborator

olganaz commented Apr 30, 2024

Background

Variant monomers are used to describe ambiguity in the structure of a macromolecule.
Variant monomers could be classified in two types:

  • Alternatives - this type of variant monomer is used to describe that at a specific position in the macromolecule, any monomer from a list of options can be present.

If we have an RNA sequence of AVC, and make 100 molecules it will result in either 100 molecules of AAC, OR a 100 molecules of ACC, or a 100 molecules of AGC.

  • Mixed - this type of variant monomer is used to specify not only the list of possible monomers that can be used, but also the probabilities (weights) with which these variants may occur at that position.

If we have an RNA sequence of AVC (p(A)=0,5; p(C)=0,3; p(G)=0,2), and make 100 molecules every time we would get 50 molecules of AAC, 30 molecules of ACC, and 20 molecules of AGC.

The scope of this task includes the ability to load/save variant monomers (alternatives and mixture) to KET, display on canvas, connect to other monomers.

Requirements

  1. User should be able to load variant monomers from Ket file.
  2. User should be able to save variant monomers to Ket file.
  3. A variant monomer has a class only if all monomers that compose the variant monomer are of the same class.

All monomers that compose the variant monomer V (adenine, cytosine, and guanine) are bases, that means that the variant monomer V is a variant base.

  1. Variant monomers should be displayed on canvas as regular monomers in flex mode:
    4.1. If all the monomers making up the variant monomer are bases, then the variant monomer is a base, and should be represented as a diamond on the canvas (see mockups).
    4.2. If all the monomers making up the variant monomer are amino acids, then the variant monomer is an amino acid, and should be represented as a hexagon on the canvas (see mockups).
    4.3. If the variant monomer is not a base or an amino acid (the class is different, or there is no class), then the variant should be represented as a square on the canvas (see mockups).
    4.4. The symbols inside monomer shape should be a one-letter symbol (described in related issues: #5186 and #2015) or an % for all other variant monomers.

  2. The variant monomer has an attachment point Rn only if all the monomers making up that variant monomer have the attachment point Rn.

  3. For establishing bonds following rules apply:
    6.1. All of the rules center-to-center, center-to-point, point-to-center, point-to-point should apply to the variant monomers.
    6.2. If a variant monomer is a base, all rules for establishing bonds with bases are followed. The same logic for all other types.
    6.3. If a variant monomer has no type, the rules for establishing bonds with CHEMs are followed (open "Select Connection Points" dialog every time (related issue: #5224)).

  • Variant monomer is made from three (or any other number) amino acids (i.e. peptides) -> Variant monomer is a hexagon & the class of variant monomer is "AminoAcid" -> Rules for amino acids (i.e. peptides)
  • Variant monomer is made from three bases -> Variant monomer is a diamond & the class of variant monomer is "Base" -> Rules for bases
  • Variant monomer is made from three (or any other number) sugars -> Variant monomer is a square & the class of variant monomer is "Sugar" -> Rules for sugars
  • Variant monomer is made from three (or any other number) phosphates-> Variant monomer is a square & the class of variant monomer is "Phosphate"-> Rules for phosphates
  • Variant monomer is made from three (or any other number) (unsplit) nucleotides-> Variant monomer is a square & the class of variant monomer is "RNA" -> Rules for (unsplit) nucleotides
  • Variant monomer is made from three (or any other number) CHEMs-> Variant monomer is a square & the class of variant monomer is "CHEM"-> Rules for CHEMs
    Variant monomer is made from an amino acid (i.e. peptide), a base, and a CHEM -> Variant monomer is a square & variant monomer has no class -> Rules for CHEMs
  1. Previews for hovering over the monomers in flex mode are addressed in the related issue: #4555.

UX
image

establishing bonds
image

@olganaz olganaz added the draft label Jun 17, 2024
@olganaz olganaz changed the title Macro: Support variant monomers in Ketcher. Support variant monomers in Ketcher (flex mode) Jun 29, 2024
@rrodionov91 rrodionov91 added this to the Ketcher 2.25.0-rc.1 milestone Jul 22, 2024
@rrodionov91 rrodionov91 self-assigned this Aug 12, 2024
@AlexeyGirin AlexeyGirin added the Test Cases Written Test cases has been written for that issue label Aug 12, 2024
@AlexeyGirin
Copy link
Collaborator

Test cases added

rrodionov91 added a commit that referenced this issue Aug 19, 2024
- added variant monomers to model/view and deserialization
rrodionov91 added a commit that referenced this issue Aug 19, 2024
- added variant monomers to model/view and deserialization
@rrodionov91 rrodionov91 linked a pull request Aug 19, 2024 that will close this issue
9 tasks
rrodionov91 added a commit that referenced this issue Aug 20, 2024
- added variant monomers to model/view and deserialization
rrodionov91 added a commit that referenced this issue Aug 21, 2024
- added variant monomers to model/view and serialization/deserialization
@AlexeyGirin
Copy link
Collaborator

Verified.

Versions

  • Ketcher Version 2.25.0-rc.1 Build at 2024-09-03; 15:31:03
  • Indigo Toolkit Version 1.24.0-rc.1.0-gb8f099851-wasm32-wasm-clang-19.0.0
  • Chrome Version 128.0.6613.114 (Official Build) (64-bit)
  • Win10

AlexeyGirin added a commit that referenced this issue Oct 12, 2024
… mode (#5724)

* Autotests: 5614 - Support variant monomers in Ketcher (flex mode)

* Autotests: #4554 - Support variant monomers in Ketcher (flex mode)
rrodionov91 pushed a commit that referenced this issue Oct 13, 2024
… mode (#5724)

* Autotests: 5614 - Support variant monomers in Ketcher (flex mode)

* Autotests: #4554 - Support variant monomers in Ketcher (flex mode)
Guch1g0v pushed a commit that referenced this issue Oct 17, 2024
- added variant monomers to model/view and serialization/deserialization
Guch1g0v pushed a commit that referenced this issue Oct 17, 2024
… mode (#5724)

* Autotests: 5614 - Support variant monomers in Ketcher (flex mode)

* Autotests: #4554 - Support variant monomers in Ketcher (flex mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants