Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply filters in a loop and log filters
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