Closed cfreschlin closed 3 years ago
Okay, I've been looking into this and haven't fully figured it out yet - but give me a few days and I will hopefully find the root of it and get back to you! Somethings going wrong with the optimization engine (that unfortunately, I am not the sole author of).
In the meantime make sure you are setting your seq_type
to "protein" like so:
seq = 'MFYKLILNGKTLKGETTTEAVDAYTAEKRF'
optimized = optipyzer.optimize(seq,org_list=[org1,org2],weights=[1,2], seq_type="protein") # <--- Notice seq_type
I bumped the version to v0.24 on PyPi and should take care of error handling a little bit better so if you want you can upgrade using pip install optipyzer --upgrade
.
Hopefully, it will still work with other sequences and species but the ones you are providing seem to break the code! I think this is an issue with the PyPi package since I was also able to optimize this sequence using the web interface just fine. In the meantime feel free to use the UI if you aren't using high-throughput workflows!
Hi - thanks for the quick response. The update seems to work! I hadn't been designating protein as the sequence but was also running into an additional error. At random points (usually 200 to 400 sequences into the optimization) the code was failing. But the update seems to have fixed that. Thanks! - Chase
Great! I need better documentation 😅 The whole app needs refactoring really since it's an older project of mine, but glad to hear it's working again!
Hi there, I'm trying to use Optipyzer for optimizing protein sequences with yeast codons. The program works perfectly until I switch the input sequence to amino acids, at which point I get the following error:
Traceback (most recent call last): File "/test.py", line 29, in
optimized = optipyzer.optimize(seq,org_list=[org1,org2],weights=[1,2])
File "/anaconda3/lib/python3.8/site-packages/optipyzer/api.py", line 160, in optimize
data = response.json()
AttributeError: 'NoneType' object has no attribute 'json'
I ran the following code:
Is there a setting I need to change for it to accept amino acid sequences?
Thanks! Chase