Skip to content

ENH: allow FeatureTable[RelativeFrequency] for filter-features #359

@VinzentRisch

Description

@VinzentRisch

PR #358 adds core scores, and downstream workflows need to pass relative-frequency-style values as metadata input so features can be filtered by core score.

filter-features currently only accepts FeatureTable[Frequency] and uses min_frequency / max_frequency integer thresholds. This should also support FeatureTable[RelativeFrequency], where the corresponding thresholds are fractions from 0 to 1.

Proposed change:

  • Allow filter-features to accept both FeatureTable[Frequency] and FeatureTable[RelativeFrequency].
  • Rename min_frequency / max_frequency to min_abundance / max_abundance.
  • Use a TypeMap so frequency tables allow whole-number thresholds from 0 to infinity, while relative-frequency tables allow fractional thresholds from 0 to 1.
  • Update the private filtering helper names to reflect abundance/fraction semantics.
  • Add a regression test covering fractional filtering on a relative-frequency table.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
In Development

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions