epam / Indigo

Universal cheminformatics toolkit, utilities and database search tools
http://lifescience.opensource.epam.com
Apache License 2.0
315 stars 104 forks source link

Wrong error message if three-letter sequence code haven't been recognized #2616

Open AlexeyGirin opened 1 week ago

AlexeyGirin commented 1 week ago

Steps to Reproduce

  1. Go to Macro - Flex mode
  2. Load using Paste from clipboard way: Ads image

Actual behavior System throws an error: Unsupported symbols: Convert error! Given string could not be loaded as (query or plain) molecule or reaction, see the error messages image

Expected behavior System throws an error: Invalid Sequence: Given string cannot be interpreted as a valid three letter sequence. image

As per requirement:

1.8. Every triplet of letters in the sequence (that has the first letter uppercase and others lowercase - requirement 1.6) should be interpreted as an amino acid using the table above.

1.9. If requirement 1.8. in not fulfilled an error message should appear, with a title "Invalid Sequence" and text "Given string cannot be interpreted as a valid three letter sequence."

AlaAsxAspAdsAsnArg is invalid because Ads does not correspond to any amino acid from the table above.

Versions

Found while testing - https://github.com/epam/ketcher/issues/5556, https://github.com/epam/Indigo/issues/2472

AlexeyGirin commented 1 day ago

Verified. image