epam / Indigo

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

Indigo incorrectly calculates RNA coordinates with data from FASTA/Sequence file #1910

Closed baranovdv closed 2 months ago

baranovdv commented 2 months ago

Steps to Reproduce

  1. Enter Ketcher Macromolecules mode
  2. Open following FASTA file as RNA: Load FASTA or Sequence file that contains few monomers causes their overlaping on the canvas.zip

Actual behavior System put on the canvas sequence elements that overlaps each other image

Expected behavior All nucleosides are distributed on the canvas without overlaping image

Related

Environment details: Ketcher Version 2.20.0-rc.2 Indigo Toolkit Version 1.19.0-rc.3.0

Win10 Chrome Version 123.0.6312.106 (Official Build) (64-bit)

Additional context Such request with 2 RNA molecules to the Indigo API:

data:  
  format: "ket" 
  options:  
    aromatize-skip-superatoms: true 
    dearomatize-on-load: false 
    gross-formula-add-rsites: true 
    ignore-no-chiral-flag: false 
    ignore-stereochemistry-errors: true 
    input-format: "chemical/x-rna-fasta" 
    mass-skip-error-on-pseudoatoms: false 
    smart-layout: true 
  struct: ">SEQUENCE1\nA\n>SEQUENCE2\nA" 
type: 1 

gives us response with 4 monomers, where coordinates of monomer1 and monomer2 are the same, that causes overlapping:

"monomer0": { 
    "type": "monomer", "id": "0", "seqid": 1, "position": { 
      "x": 0.0, 
      "y": -0.0 
    }, "alias": "R", "templateId": "Rib" 
  }, "monomer1": { 
    "type": "monomer", "id": "1", "seqid": 1, "position": { 
      "x": 0.0, 
      "y": -1.600000023841858 
    }, "alias": "A", "templateId": "Ade" 
  }, "monomer2": { 
    "type": "monomer", "id": "2", "seqid": 1, "position": { 
      "x": 0.0, 
      "y": -1.600000023841858 
    }, "alias": "R", "templateId": "Rib" 
  }, "monomer3": { 
    "type": "monomer", "id": "3", "seqid": 1, "position": { 
      "x": 0.0, 
      "y": -3.200000047683716 
    }, "alias": "A", "templateId": "Ade" 
  } 
AlexeyGirin commented 1 month ago

Verified.