broadinstitute / adapt

A package for designing activity-informed nucleic acid diagnostics for viruses.
MIT License
29 stars 2 forks source link

Diversity metric and best n guides in design_naively #30

Closed priyappillai closed 4 years ago

priyappillai commented 4 years ago

Allows design_naively to output designs based on a diversity metric (currently, only works with entropy). Added command line arguments to pick which guide methods are used, to design based on a reference sequence, and to set the number of guides to design for in each window. Modified constuct_guide_naively and find_guide_in_each_window in design_naively.py for the above and wrote a function to calculate entropy at each position (position_entropy) in alignment.py

priyappillai commented 4 years ago

The added design_naively.py tests are nice! Could you just move them to bin/tests? I think that will be more consistent with how we nest unit tests under a tests/ directory next to the module.

There was an issue with the unittest module’s discover function with anything in bin. I think tests need to be in a package in order for discover to find them, and since the bin folder doesn’t have an __init__.py file, it can’t see anything in it, even if bin/testshas an __init__.py file. I wasn’t sure if I could add an __init__.py file to the bin directory without it breaking things, but I just tested it and it appears to be working. I’ll push the commit in a minute.