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

#3824 - Macro: Modify nucleotides from sequence in RNA builder #4335

Conversation

ilya-asiyuk-epam
Copy link
Contributor

@ilya-asiyuk-epam ilya-asiyuk-epam commented Mar 25, 2024

How the feature works? / How did you fix the issue?

(Screenshots, videos, or GIFs, if applicable)

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

@ilya-asiyuk-epam ilya-asiyuk-epam changed the title #3824 - Macro: Modify nucleotides from sequence in RNA builder WIP: #3824 - Macro: Modify nucleotides from sequence in RNA builder Mar 25, 2024
@ilya-asiyuk-epam ilya-asiyuk-epam force-pushed the 3824-macro-modify-nucleotides-from-sequence-in-rna-builder branch 2 times, most recently from 1812d78 to a73439f Compare March 27, 2024 06:26
@ilya-asiyuk-epam ilya-asiyuk-epam linked an issue Mar 27, 2024 that may be closed by this pull request
@ilya-asiyuk-epam ilya-asiyuk-epam force-pushed the 3824-macro-modify-nucleotides-from-sequence-in-rna-builder branch 10 times, most recently from 80cd987 to 1e622ba Compare April 3, 2024 14:40
@ilya-asiyuk-epam ilya-asiyuk-epam changed the title WIP: #3824 - Macro: Modify nucleotides from sequence in RNA builder #3824 - Macro: Modify nucleotides from sequence in RNA builder Apr 4, 2024
@ilya-asiyuk-epam ilya-asiyuk-epam force-pushed the 3824-macro-modify-nucleotides-from-sequence-in-rna-builder branch 5 times, most recently from 3b963d7 to d6d5a45 Compare April 8, 2024 17:10
Comment on lines +20 to +41
if (groupName === MonomerGroups.BASES) {
setIsDisabled(!item?.props?.MonomerCaps?.R1);
} else if (groupName === MonomerGroups.PHOSPHATES) {
setIsDisabled(
!(item?.props?.MonomerCaps?.R1 && item?.props?.MonomerCaps?.R2),
);
} else if (groupName === MonomerGroups.SUGARS) {
if (isSequenceFirstsOnlyNucleotidesSelected) {
setIsDisabled(
!(item?.props?.MonomerCaps?.R3 && item?.props?.MonomerCaps?.R2),
);
} else {
setIsDisabled(
!(
item?.props?.MonomerCaps?.R3 &&
item?.props?.MonomerCaps?.R2 &&
item?.props?.MonomerCaps?.R1
),
);
}
}
}, [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need to move the logic about which monomer item is valid for rna connection to ketcher-core package because probably we can use it in future for different purposes and places. I would propose to create a static method in Phosphate, RnaBase and Sugar classes which receives monomerItem and returns boolean.

@ilya-asiyuk-epam ilya-asiyuk-epam force-pushed the 3824-macro-modify-nucleotides-from-sequence-in-rna-builder branch 2 times, most recently from 66319d6 to 3c29f3c Compare April 8, 2024 18:23
@ilya-asiyuk-epam ilya-asiyuk-epam force-pushed the 3824-macro-modify-nucleotides-from-sequence-in-rna-builder branch from 3c29f3c to edf94e6 Compare April 8, 2024 18:43
@rrodionov91 rrodionov91 merged commit 08f1d10 into master Apr 9, 2024
5 checks passed
@rrodionov91 rrodionov91 deleted the 3824-macro-modify-nucleotides-from-sequence-in-rna-builder branch April 9, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Macro: Modify nucleotides from sequence in RNA builder
2 participants