Skip to content

Commit

Permalink
#5490 - Update indigo to 1.24.0-rc.2 in browser module (#5523)
Browse files Browse the repository at this point in the history
- also updated ketcher to 2.25.0-rc.2
- fixed monomerFactory to rely on MonomerClass field
- fixed screenshots
  • Loading branch information
rrodionov91 authored Sep 18, 2024
1 parent 14444b6 commit 371321b
Show file tree
Hide file tree
Showing 44 changed files with 71 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ const correctHELMStrings: IHELMString[] = [
'RNA1{[O1[C@@H]%91[C@H](O)[C@H](O%92)[C@H]1CO%93.[*:3]%91.[*:1]%93.[*:2]%92 |$;;;;;;;;;_R3;_R1;_R2$|](A)P}$$$$V2.0',
shouldFail: true,
issueNumber: 'https://github.com/epam/Indigo/issues/2339',
pageReloadNeeded: true,
},
{
helmDescription:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/ketcher-core/__tests__/mock-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Peptide } from 'domain/entities/Peptide';
import { PolymerBond } from 'domain/entities/PolymerBond';
import { MonomerItemType } from 'domain/types';
import { mockFn } from 'jest-mock-extended';
import { KetMonomerClass } from 'application/formatters';

const mockAtoms = [
{
Expand Down Expand Up @@ -757,6 +758,7 @@ export const peptideMonomerItem: MonomerItemType = {
MonomerCode: '',
MonomerName: '',
MonomerType: 'PEPTIDE',
MonomerClass: KetMonomerClass.AminoAcid,
Name: '',
MonomerNaturalAnalogCode: 'A',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/ketcher-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-core",
"version": "2.25.0-rc.1",
"version": "2.25.0-rc.2",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
import {
PeptideRenderer,
ChemRenderer,
AmbiguousMonomerRenderer,
BaseMonomerRenderer,
ChemRenderer,
PeptideRenderer,
PhosphateRenderer,
RNABaseRenderer,
SugarRenderer,
PhosphateRenderer,
UnresolvedMonomerRenderer,
UnsplitNucleotideRenderer,
AmbiguousMonomerRenderer,
} from 'application/render/renderers';
import { MonomerOrAmbiguousType } from 'domain/types';
import {
Peptide,
AmbiguousMonomer,
Chem,
Sugar,
Peptide,
Phosphate,
RNABase,
Sugar,
UnresolvedMonomer,
UnsplitNucleotide,
AmbiguousMonomer,
} from 'domain/entities';
import { KetMonomerClass } from 'application/formatters/types/ket';
import { isAmbiguousMonomerLibraryItem } from 'domain/helpers/monomers';
import {
rnaDnaNaturalAnalogues,
unknownNaturalAnalogues,
} from 'domain/constants/monomers';

type DerivedClass<T> = new (...args: unknown[]) => T;
export const MONOMER_CONST = {
Expand Down Expand Up @@ -65,39 +69,49 @@ export const monomerFactory = (
MonomerRenderer = UnresolvedMonomerRenderer;
ketMonomerClass = KetMonomerClass.CHEM;
} else if (
monomer.props.MonomerType === MONOMER_CONST.CHEM ||
(monomer.props.MonomerType === MONOMER_CONST.RNA &&
(monomer.props.MonomerClass === MONOMER_CONST.MODDNA ||
monomer.props.MonomerClass === MONOMER_CONST.DNA))
) {
Monomer = Chem;
MonomerRenderer = ChemRenderer;
ketMonomerClass = KetMonomerClass.CHEM;
} else if (
monomer.props.MonomerClass === MONOMER_CONST.RNA ||
monomer.props.MonomerClass === MONOMER_CONST.DNA
monomer.props.MonomerClass === KetMonomerClass.RNA ||
monomer.props.MonomerClass === KetMonomerClass.DNA
) {
Monomer = UnsplitNucleotide;
MonomerRenderer = UnsplitNucleotideRenderer;
ketMonomerClass = KetMonomerClass.RNA;
} else if (monomer.props.MonomerType === MONOMER_CONST.PEPTIDE) {
} else if (
monomer.props.MonomerClass === KetMonomerClass.AminoAcid ||
monomer.props.MonomerType === MONOMER_CONST.PEPTIDE
) {
Monomer = Peptide;
MonomerRenderer = PeptideRenderer;
ketMonomerClass = KetMonomerClass.AminoAcid;
} else if (
monomer.props.MonomerClass === KetMonomerClass.Sugar ||
(monomer.props.MonomerType === MONOMER_CONST.RNA &&
monomer.props.MonomerNaturalAnalogCode === MONOMER_CONST.R)
) {
Monomer = Sugar;
MonomerRenderer = SugarRenderer;
ketMonomerClass = KetMonomerClass.Sugar;
} else if (
monomer.props.MonomerClass === KetMonomerClass.Phosphate ||
(monomer.props.MonomerType === MONOMER_CONST.RNA &&
monomer.props.MonomerNaturalAnalogCode === MONOMER_CONST.P)
) {
Monomer = Phosphate;
MonomerRenderer = PhosphateRenderer;
ketMonomerClass = KetMonomerClass.Phosphate;
} else if (
monomer.props.MonomerClass === KetMonomerClass.Base ||
(monomer.props.MonomerType === MONOMER_CONST.RNA &&
[...rnaDnaNaturalAnalogues, ...unknownNaturalAnalogues].includes(
monomer.props.MonomerNaturalAnalogCode,
))
) {
Monomer = RNABase;
MonomerRenderer = RNABaseRenderer;
ketMonomerClass = KetMonomerClass.Base;
} else {
if (monomer.props.MonomerNaturalAnalogCode === MONOMER_CONST.R) {
Monomer = Sugar;
MonomerRenderer = SugarRenderer;
ketMonomerClass = KetMonomerClass.Sugar;
} else if (monomer.props.MonomerNaturalAnalogCode === MONOMER_CONST.P) {
Monomer = Phosphate;
MonomerRenderer = PhosphateRenderer;
ketMonomerClass = KetMonomerClass.Phosphate;
} else {
Monomer = RNABase;
MonomerRenderer = RNABaseRenderer;
ketMonomerClass = KetMonomerClass.Base;
}
Monomer = Chem;
MonomerRenderer = ChemRenderer;
ketMonomerClass = KetMonomerClass.CHEM;
}

return [Monomer, MonomerRenderer, ketMonomerClass];
Expand Down
1 change: 1 addition & 0 deletions packages/ketcher-core/src/domain/constants/monomers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export enum RNA_DNA_NON_MODIFIED_PART {
}

export const rnaDnaNaturalAnalogues = ['A', 'T', 'G', 'C', 'U'];
export const unknownNaturalAnalogues = ['.', 'X'];
export const peptideNaturalAnalogues = [
'A',
'C',
Expand Down
2 changes: 1 addition & 1 deletion packages/ketcher-macromolecules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-macromolecules",
"version": "2.25.0-rc.1",
"version": "2.25.0-rc.2",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
AttachmentPointName,
KetConnectionType,
KetMonomerClass,
KetMonomerGroupTemplateClass,
KetTemplateType,
MonomerItemType,
Expand Down Expand Up @@ -278,6 +279,7 @@ const phosphate = {
Name: 'Phosphate',
MonomerNaturalAnalogCode: 'P',
MonomerType: '',
MonomerClass: KetMonomerClass.Phosphate,
BranchMonomer: '',
MonomerCaps: {},
MonomerCode: '',
Expand All @@ -291,6 +293,7 @@ const ribose = {
Name: 'Ribose',
MonomerNaturalAnalogCode: 'R',
MonomerType: '',
MonomerClass: KetMonomerClass.Sugar,
BranchMonomer: '',
MonomerCaps: {},
MonomerCode: '',
Expand All @@ -304,6 +307,7 @@ const thymine = {
Name: 'Thymine',
MonomerNaturalAnalogCode: 'T',
MonomerType: '',
MonomerClass: KetMonomerClass.Base,
BranchMonomer: '',
MonomerCaps: {},
MonomerCode: '',
Expand All @@ -317,6 +321,7 @@ const cytosine = {
Name: 'Cytosine',
MonomerNaturalAnalogCode: 'C',
MonomerType: '',
MonomerClass: KetMonomerClass.Base,
BranchMonomer: '',
MonomerCaps: {},
MonomerCode: '',
Expand All @@ -330,6 +335,7 @@ const uracil = {
Name: 'Uracil',
MonomerNaturalAnalogCode: 'U',
MonomerType: '',
MonomerClass: KetMonomerClass.Base,
BranchMonomer: '',
MonomerCaps: {},
MonomerCode: '',
Expand All @@ -343,6 +349,7 @@ const adenine = {
Name: 'Adenine',
MonomerNaturalAnalogCode: 'A',
MonomerType: '',
MonomerClass: KetMonomerClass.Base,
BranchMonomer: '',
MonomerCaps: {},
MonomerCode: '',
Expand All @@ -356,6 +363,7 @@ const guanine = {
Name: 'Guanine',
MonomerNaturalAnalogCode: 'G',
MonomerType: '',
MonomerClass: KetMonomerClass.Base,
BranchMonomer: '',
MonomerCaps: {},
MonomerCode: '',
Expand Down
2 changes: 1 addition & 1 deletion packages/ketcher-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-react",
"version": "2.25.0-rc.1",
"version": "2.25.0-rc.2",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down
4 changes: 2 additions & 2 deletions packages/ketcher-standalone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-standalone",
"version": "2.25.0-rc.1",
"version": "2.25.0-rc.2",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"@babel/runtime": "^7.17.9",
"indigo-ketcher": "1.24.0-rc.1",
"indigo-ketcher": "1.24.0-rc.2",
"ketcher-core": "*"
},
"devDependencies": {
Expand Down

0 comments on commit 371321b

Please sign in to comment.