nleroy917 / optipyzer

Multi-Species Codon Optimization Engine
https://optipyzer.com
Apache License 2.0
23 stars 5 forks source link

Optimizing >2 species #62

Open idlutz opened 6 months ago

idlutz commented 6 months ago

Thanks for making this, just the tool I was looking for!

However, both the web app and the python package throw an error when trying to optimize for >2 species:

ERROR - Request failed with status code: 500 JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Is this functionality supported by the tool?

nleroy917 commented 6 months ago

Hey @idlutz thanks for opening up an issue.

Are you able to give me some data you used as input so I may try to reproduce this? It should definitely work with >2 species.

Let me know and I'll look into it!

idlutz commented 6 months ago

Thanks for getting back so quickly.

Here is an example that produces an error using the python package:

import optipyzer

api = optipyzer.API()

protein_seq = "EVQLVESGGGLVQPGRSLRLSCAASGFTFDDYAMHWVRQAPGKGLEWVSAITWNSGHIDYADSVEGRFTISRDNAKNSLYLDMNSLRAEDTAVYYCAKVSYLSTASSLDYWGQGTLVTVSSASTKGPSVFPLAPSSKSTSGGTAALGCLVKDYFPEPVTVSWNSGALTSGVHTFPAVLQSSGLYSLSSVVTVPSSSLGTQTYICNVNHKPSNTKVDKKI"

result = api.optimize(
    seq=protein_seq,
    seq_type="protein",
    weights={"e_coli":1, "human": 1, "yeast":1},
)
print(result['optimized_sd'])

The web app also produces an error with the same example.