Skip to content

Commit

Permalink
Apply filters in a loop and log filters
Browse files Browse the repository at this point in the history
Reorganizes filtering logic such that we first create a list of filters
to apply through a `construct_filters` function and then apply those
filters through a new `apply_filters` function that loops through each
filter. This new function returns a tuple of strains in three categories
of strains to keep, strains to exclude, and strains to force include.
This function can be applied to a full metadata file or individual
chunks of metadata. The lists of excluded and force-included strains
also include the reasons why these strains were filtered.

The rest of this commit updates the corresponding calling code in `run`
to use these new functions. One intended benefit of this new approach to
filtering is the ability to log the reason why each strain was filtered
or force-included as an additional log output file, `--output-log`.
  • Loading branch information
huddlej committed Jul 20, 2021
1 parent 653079e commit 8fb5405
Show file tree
Hide file tree
Showing 4 changed files with 522 additions and 195 deletions.
Loading

0 comments on commit 8fb5405

Please sign in to comment.