You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After writing a new Specification class with a "evaluate" method under the folder dnachisel/builtin_specifications(for eg. my_new_optimization_goal.py, similar to EnforceGCContent.py), what else should be done so that my DnaOptimizationProblem can directly use it in a way like objectives = [my_new_optimization_goal(xxx=, xxx=), CodonOptimize(species='e_coli', location=(500, 1400))]?
Or I just have to put the new class somewhere else?
Thanks,
Wyatt
The text was updated successfully, but these errors were encountered:
Defining evaluate() should be sufficient, although some other methods can additionally be redefined for your new objective if necessary (__str__, localized, initialized_on_problem).
Note that the new optimization objective does NOT need to be added to the library code in builtin_specifications/, it can simply be in the same file or notebook as the rest of your script (see an example here where a new MinimizeNinemersScore is defined just before being used).
Thank you for your great work!
After writing a new
Specification
class with a "evaluate" method under the folder dnachisel/builtin_specifications(for eg. my_new_optimization_goal.py, similar to EnforceGCContent.py), what else should be done so that myDnaOptimizationProblem
can directly use it in a way likeobjectives = [my_new_optimization_goal(xxx=, xxx=), CodonOptimize(species='e_coli', location=(500, 1400))]
?Or I just have to put the new class somewhere else?
Thanks,
Wyatt
The text was updated successfully, but these errors were encountered: