VariantWorks icon indicating copy to clipboard operation
VariantWorks copied to clipboard

[label_loader] improve filtering framework

Open tijyojwad opened this issue 5 years ago • 2 comments

The label loader currently has a make shift filtering framework making use if conditionals to check each variant candidate. However, this is error prone and could lead to some filters being ignored especially when classes are inherited. Feature request is to improve the filter management framework so it is more robust.

tijyojwad avatar May 11 '20 00:05 tijyojwad

the following structure may make sense -

  1. a common set of "filters" are registered with the LabelLoader class
  2. the LabelLoader implementations create a Variant tuple out of each entry they process when parsing the file
  3. the parser adds each variant to the list of samples by calling a base class function such as _add_sample
  4. in the base class implementation of _add_sample, the filters are applied to each incoming variant before getting added to the final list of samples

tijyojwad avatar May 11 '20 17:05 tijyojwad

After giving this some more thought with @ohadmo we realized that label filtering can become a pretty big effort if it was to be done well, and it's not really necessary for the first version. so we're changing direction a bit.

This task is being moved to a later milestone to be handled properly. And for the first release we're removing support for customizable filtering.

tijyojwad avatar May 14 '20 16:05 tijyojwad