Skip to content

Commit

Permalink
Backmerge: #5709 - Unable to load variant sugar from HELM - system th…
Browse files Browse the repository at this point in the history
…rows an error: Convert error! {} (#5732)

- fixed sugar/phosphate/chem variant monomers render
  • Loading branch information
rrodionov91 authored Oct 13, 2024
1 parent 3fd6e4c commit 5d7f256
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 5 deletions.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,11 @@ const incorrectHELMStrings: IHELMString[] = [
helmDescription: '43. Negative probability (CHEM)',
HELMString: 'CHEM1{([A6OH]:-10,[Az]:20)}$$$$V2.0',
},
{
helmDescription: '44. Probability is greater than 100 (CHEM)',
HELMString: 'CHEM1{([A6OH]:10,[Az]:1000)}$$$$V2.0',
},
// {
// helmDescription: '44. Probability is greater than 100 (CHEM)',
// HELMString: 'CHEM1{([A6OH]:10,[Az]:1000)}$$$$V2.0',
// },
// It is not a bug because of Aleksandr Savelev suggestion
{
helmDescription: '45. Missing probability token (RNA)',
HELMString: 'RNA1{R(A:,C:90)P}$$$$V2.0',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ export class AmbiguousMonomerRenderer extends BaseMonomerRenderer {
public show(theme) {
super.show(theme);
this.appendNumberOfMonomers();
this.appendEnumeration();
if (this.enumerationElementPosition) {
this.appendEnumeration();
}
if (this.CHAIN_BEGINNING) {
this.appendChainBeginning();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const MONOMER_SYMBOLS_IDS = {
hover: '#sugar-selection',
selected: '#sugar-selection',
body: '#sugar',
variant: '#sugar-variant',
},
[KetMonomerClass.Base]: {
hover: '#rna-base-selection',
Expand All @@ -26,6 +27,7 @@ export const MONOMER_SYMBOLS_IDS = {
hover: '#phosphate-selection',
selected: '#phosphate-selection',
body: '#phosphate',
variant: '#phosphate-variant',
},
[KetMonomerClass.RNA]: {
hover: '#nucleotide-hover',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,19 @@ export const PhosphateAvatar = () => (
strokeWidth="1.5"
/>
</symbol>
<symbol id="phosphate-variant" viewBox="0 0 70 70" width="70" height="70">
<rect
className="monomer-body"
width="27"
height="27"
data-actual-width="27"
data-actual-height="27"
stroke="#585858"
strokeWidth="0.5"
x="0.5"
y="0.5"
rx="15"
/>
</symbol>
</>
);
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,19 @@ export const SugarAvatar = () => (
strokeWidth="2.5"
/>
</symbol>
<symbol id="sugar-variant" viewBox="0 0 72 72" width="70" height="70">
<rect
className="monomer-body"
width="28.5"
height="28.5"
data-actual-width="28.5"
data-actual-height="28.5"
x="0.5"
y="0.5"
rx="5"
stroke="#585858"
strokeWidth="0.5"
/>
</symbol>
</>
);

0 comments on commit 5d7f256

Please sign in to comment.