epam / Indigo

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

Error message is wrong for invalid range (PEPTIDE1{([Aad]+[Abu]+[Aca]+[Aib]+[Apm])'5-i'}$$$$V2.0) #2278

Closed AlexeyGirin closed 1 month ago

AlexeyGirin commented 1 month ago

Steps to Reproduce

  1. Toggle to Macromolecules mode
  2. Load using Paste from clipboard way: PEPTIDE1{([Aad]+[Abu]+[Aca]+[Aib]+[Apm])'5-i'}$$$$V2.0 image

Actual behavior Error message is wrong: Convert error! Given string could not be loaded as (query or plain) molecule or reaction, see the error messages: 'SEQUENCE loader: Repeating not supported now.' image

Expected behavior Error message should report that range is not supported now (in any case - message about repeating is irrelevant)

Versions

Found while testing - https://github.com/epam/Indigo/issues/2188

AliaksandrDziarkach commented 1 month ago

According to documentation:

5.2.4.2 Monomer repeating units A single monomer or a group of monomers can be repeated multiple times. The repeating unit is marked as the repeat unit count enclosed in single quote characters immediately after the monomer or a group of monomers that are enclosed in round brackets. The repeat unit count can be a single value or a range of repeats. The range is defined with a “-“ between the two numbers.

So message is correct.

AlexeyGirin commented 1 month ago

Verified.