epam / epam/Indigo

System should NOT save ambiguous amino acid to 1-letter sequence as `X`

Open
#3,349 1 comment 0 reactions 0 assignees View on GitHub
Export to Sequence Priority: Low Severity: Low
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

**Steps to Reproduce**
1. Select Macromolecules mode:
Image

2. Switch to Flex layout mode (Click on the “A” button in the top panel to open Macromolecules modes switcher
and select the third option "Switch to flex layout mode":

https://github.com/user-attachments/assets/62006ee9-531f-4eda-ac97-b4ec3b16dbd1

Image

3. Copy the following structure in HELM format:
```
PEPTIDE1{(A,C)}$$$$V2.0
```

4. Click the folder icon "Open..." in the top left corner of the top panel
Image

5. In Open Structure pop-up expand the format dropdown by clicking on preselected "Ket" value:
Image

6. Select "HELM"
Image

5. Using Ctrl-V paste previously copied HELM string into Open Structure pop-up

6. Click on "Open as New" button:
Image

7. Click on "Save as..." button:
Image

8. Expand the "File format:" dropdown by clicking on preselected "Ket" value:
Image

9. Select "Sequence (1-letter code)"

**Actual behavior**
System saves it as `X`
![Image](https://github.com/user-attachments/assets/02fb9203-a235-45a0-949c-bbce51a5116c)

**Expected behavior**
Error message should occur

as per [requirement](https://github.com/epam/ketcher/issues/5556):

> 2.3. If one of the amino acids is a non-standard ambiguous amino acid an error message should appear, with the title "Non-standard amino acid" and text "Non-standard ambiguous amino acids cannot be exported to the selected format".
> > By standard ambiguous amino acids we consider amino acids that we have in the library (B, J, X, and Z).
>
>

**Versions**
- Ketcher Version 3.2.0-rc.1 Build at 2025-03-04; 14:24:35
- Indigo Version 1.30.0-rc.1.0-g9bdedaba9-wasm32-wasm-clang-19.0.0
- Chrome Version 134.0.6998.36 (Official Build) (64-bit)
- Win10

Issue found while testing: https://github.com/epam/indigo/issues/2015

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.