Skip to content

Commit

Permalink
#2341 Save to Sequence and FASTA doesn't work for monomers loaded fr…
Browse files Browse the repository at this point in the history
…om HELM with inline SMILES

Fix FASTA export. Add UT.
  • Loading branch information
AliaksandrDziarkach committed Sep 13, 2024
1 parent 1c4dcd7 commit 5819db5
Show file tree
Hide file tree
Showing 5 changed files with 809 additions and 5 deletions.
1 change: 1 addition & 0 deletions api/tests/integration/ref/formats/ket_to_fasta.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
1822-peptide.fasta:SUCCEED
1843-rna.fasta:SUCCEED
1950-mixed-seq.fasta:SUCCEED
2341-no-analog.fasta:SUCCEED
nucleotides.fasta:SUCCEED
5 changes: 3 additions & 2 deletions api/tests/integration/tests/formats/ket_to_fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def find_diff(a, b):
"1843-rna",
"1950-mixed-seq",
"nucleotides",
"2341-no-analog",
]

lib = indigo.loadMonomerLibraryFromFile(
Expand All @@ -35,9 +36,9 @@ def find_diff(a, b):

files.sort()
for filename in files:
mol = indigo.loadMoleculeFromFile(os.path.join(root, filename + ".ket"))
mol = indigo.loadKetDocumentFromFile(os.path.join(root, filename + ".ket"))
# with open(os.path.join(ref_path, filename) + ".fasta", "w") as file:
# file.write(mol.fasta())
# file.write(mol.fasta(lib))
with open(os.path.join(ref_path, filename) + ".fasta", "r") as file:
seq_ref = file.read()
seq = mol.fasta(lib)
Expand Down
Loading

0 comments on commit 5819db5

Please sign in to comment.