forked from jcg/d-tailor
-
Notifications
You must be signed in to change notification settings - Fork 1
Guide: how to add new scoring functions
Nathan Mih edited this page May 11, 2019
·
2 revisions
- Create a new feature class containing the method to calculate your feature in
dtailor/Features/Basic.py
, or make a new module if you'd like - The class must have the method
set_scores
that sets the calculated feature inself.scores
- You can also manually set
self.mutable_region
to be in the location of this specific feature, in order to target mutagenesis to the region. The LocalGC class is a good example of how to do this.
- In
dtailor/RunningExamples/Designer/GenericDesigner.py
, add your feature to theconfigureSolution
method - In
dtailor/test/conftest.py
...- Add the levels for your feature (example:
_levels_smallrepeats = {'1': (0, 40), '0': (40, 100)}
) - Make a new fixture for these levels
- Add the feature to
design_params
- Since this feature is in an OrderedDict, add it to the
_targets
variable at the end according to the level you want it to reach
- Add the levels for your feature (example:
- In
dtailor/test/test_doe_design.py
add to the two methods, adjust the n_features - Run the tests to make sure your new feature works