Skip to content

Commit

Permalink
sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
even1024 committed Dec 27, 2023
1 parent 19fa768 commit cdb3300
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions utils/indigo-service/backend/service/v2/indigo_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,18 @@ def load_moldata(
if input_format in ("smarts", "chemical/x-daylight-smarts"):
md.struct = indigo.loadSmarts(molstr)
md.is_query = True
elif input_format in ("chemical/x-peptide-sequence"):
md.struct = indigo.loadSequence(molstr, "PEPTIDE")
md.is_rxn = False
md.is_query = False
elif input_format in ("chemical/x-rna-sequence"):
md.struct = indigo.loadSequence(molstr, "RNA")
md.is_rxn = False
md.is_query = False
elif input_format in ("chemical/x-dna-sequence"):
md.struct = indigo.loadSequence(molstr, "DNA")
md.is_rxn = False
md.is_query = False
elif molstr.startswith("InChI"):
md.struct = indigo.inchi.loadMolecule(molstr)
md.is_rxn = False
Expand Down
3 changes: 3 additions & 0 deletions utils/indigo-service/backend/service/v2/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class InputFormatSchema(Schema):
"chemical/x-cdxml",
"chemical/x-cdx",
"chemical/x-sdf",
"chemical/x-peptide-sequence",
"chemical/x-rna-sequence",
"chemical/x-dna-sequence",
)
input_format = fields.Str(missing=None, validate=OneOf(struct_mime_types))

Expand Down

0 comments on commit cdb3300

Please sign in to comment.